
<!DOCTYPE html>

<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />

    <title>Leo’s Commands Reference &#8212; Leo 6.7.2 documentation</title>
    <link rel="stylesheet" type="text/css" href="_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="_static/classic.css" />
    <link rel="stylesheet" type="text/css" href="_static/custom.css" />
    
    <script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
    <script src="_static/jquery.js"></script>
    <script src="_static/underscore.js"></script>
    <script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
    <script src="_static/doctools.js"></script>
    <script src="_static/sphinx_highlight.js"></script>
    
    <script src="_static/sidebar.js"></script>
    
    <link rel="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" />
    <link rel="next" title="Directives Reference" href="directives.html" />
    <link rel="prev" title="Plugins" href="plugins.html" /> 
  </head><body>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="directives.html" title="Directives Reference"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="plugins.html" title="Plugins"
             accesskey="P">previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="leo_toc.html">Leo 6.7.2 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="usersguide.html" accesskey="U">Leo’s Users Guide</a> &#187;</li>
        <li class="nav-item nav-item-this"><a href="">Leo’s Commands Reference</a></li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <section id="leo-s-commands-reference">
<h1>Leo’s Commands Reference<a class="headerlink" href="#leo-s-commands-reference" title="Permalink to this heading">¶</a></h1>
<p>This chapter lists almost all of Leo’s commands. It starts with a discussion of the Emacs-like minibuffer.</p>
<div class="contents local topic" id="contents">
<p class="topic-title">Contents</p>
<ul class="simple">
<li><p><a class="reference internal" href="#executing-commands-from-the-minibuffer" id="id16">Executing commands from the minibuffer</a></p>
<ul>
<li><p><a class="reference internal" href="#typing-completion" id="id17">Typing completion</a></p></li>
<li><p><a class="reference internal" href="#filename-completion" id="id18">Filename completion</a></p></li>
</ul>
</li>
<li><p><a class="reference internal" href="#most-important-commands" id="id19">Most important commands</a></p>
<ul>
<li><p><a class="reference internal" href="#file-operations-sessions" id="id20">File operations &amp; sessions</a></p></li>
<li><p><a class="reference internal" href="#switching-focus" id="id21">Switching focus</a></p></li>
<li><p><a class="reference internal" href="#outline-commands" id="id22">Outline commands</a></p></li>
<li><p><a class="reference internal" href="#selecting-outline-nodes" id="id23">Selecting outline nodes</a></p></li>
<li><p><a class="reference internal" href="#moving-the-cursor" id="id24">Moving the cursor</a></p></li>
<li><p><a class="reference internal" href="#finding-replacing-text" id="id25">Finding &amp; replacing text</a></p></li>
<li><p><a class="reference internal" href="#formatting-text" id="id26">Formatting text</a></p></li>
<li><p><a class="reference internal" href="#undoing-and-redoing-changes" id="id27">Undoing and redoing changes</a></p></li>
<li><p><a class="reference internal" href="#clone-find-commands" id="id28">Clone-find commands</a></p></li>
<li><p><a class="reference internal" href="#syncing-clean-files" id="id29">Syncing &#64;clean files</a></p></li>
<li><p><a class="reference internal" href="#help-commands" id="id30">Help commands</a></p></li>
<li><p><a class="reference internal" href="#debugger-commands" id="id31">Debugger commands</a></p></li>
<li><p><a class="reference internal" href="#operations-on-reference-leo-files" id="id32">Operations on reference .leo files</a></p></li>
</ul>
</li>
<li><p><a class="reference internal" href="#all-other-commands" id="id33">All other commands</a></p>
<ul>
<li><p><a class="reference internal" href="#id1" id="id34">Clone-find commands</a></p></li>
<li><p><a class="reference internal" href="#debug-commands" id="id35">Debug commands</a></p>
<ul>
<li><p><a class="reference internal" href="#running-external-debuggers" id="id36">Running External debuggers</a></p></li>
<li><p><a class="reference internal" href="#printing-settings-and-other-data" id="id37">Printing settings and other data</a></p></li>
<li><p><a class="reference internal" href="#other-debugging-commands" id="id38">Other debugging commands</a></p></li>
</ul>
</li>
<li><p><a class="reference internal" href="#edit-commands" id="id39">Edit commands</a></p>
<ul>
<li><p><a class="reference internal" href="#cutting-pasting-and-selecting-text" id="id40">Cutting, pasting and selecting text</a></p></li>
<li><p><a class="reference internal" href="#indenting-body-text" id="id41">Indenting body text</a></p></li>
<li><p><a class="reference internal" href="#adding-and-deleting-comments-in-body-text" id="id42">Adding and deleting comments in body text</a></p></li>
<li><p><a class="reference internal" href="#id4" id="id43">Moving the cursor</a></p></li>
<li><p><a class="reference internal" href="#text-formatting-commands" id="id44">Text formatting commands</a></p></li>
<li><p><a class="reference internal" href="#creating-nodes-from-body-text" id="id45">Creating nodes from body text</a></p></li>
<li><p><a class="reference internal" href="#executing-python-scripts-in-body-text" id="id46">Executing Python scripts in body text</a></p></li>
<li><p><a class="reference internal" href="#multiple-body-editors" id="id47">Multiple body editors</a></p></li>
<li><p><a class="reference internal" href="#undoing-changes" id="id48">Undoing changes</a></p></li>
</ul>
</li>
<li><p><a class="reference internal" href="#emacs-like-commands" id="id49">Emacs-like commands</a></p>
<ul>
<li><p><a class="reference internal" href="#abbreviation-commands" id="id50">Abbreviation commands</a></p></li>
<li><p><a class="reference internal" href="#cursor-movement-commands" id="id51">Cursor movement commands</a></p></li>
<li><p><a class="reference internal" href="#emacs-text-formatting" id="id52">Emacs text formatting</a></p></li>
<li><p><a class="reference internal" href="#rectangle-commands" id="id53">Rectangle commands</a></p></li>
<li><p><a class="reference internal" href="#scrolling-the-outline-pane" id="id54">Scrolling the outline pane</a></p></li>
<li><p><a class="reference internal" href="#yank-kill-delete-commands" id="id55">Yank, kill &amp; delete commands</a></p></li>
</ul>
</li>
<li><p><a class="reference internal" href="#file-commands" id="id56">File commands</a></p>
<ul>
<li><p><a class="reference internal" href="#loading-saving-reverting-files" id="id57">Loading, saving &amp; reverting files</a></p></li>
<li><p><a class="reference internal" href="#closing-outlines-quitting-leo" id="id58">Closing outlines &amp; quitting Leo</a></p></li>
<li><p><a class="reference internal" href="#importing-exporting-files" id="id59">Importing &amp; exporting files</a></p></li>
<li><p><a class="reference internal" href="#using-sessions" id="id60">Using sessions</a></p></li>
<li><p><a class="reference internal" href="#communicating-with-external-editors" id="id61">Communicating with external editors</a></p></li>
<li><p><a class="reference internal" href="#creating-deleting-directories-files" id="id62">Creating &amp; deleting directories &amp; files</a></p></li>
<li><p><a class="reference internal" href="#managing-recent-files" id="id63">Managing recent files</a></p></li>
</ul>
</li>
<li><p><a class="reference internal" href="#id7" id="id64">Help commands</a></p></li>
<li><p><a class="reference internal" href="#language-conversion-commands" id="id65">Language conversion commands</a></p></li>
<li><p><a class="reference internal" href="#minibuffer-commands" id="id66">Minibuffer commands</a></p></li>
<li><p><a class="reference internal" href="#miscellaneous-commands" id="id67">Miscellaneous commands</a></p></li>
<li><p><a class="reference internal" href="#mouseless-leo-commands" id="id68">Mouseless Leo commands</a></p>
<ul>
<li><p><a class="reference internal" href="#event-simulation-commands" id="id69">Event simulation commands</a></p></li>
<li><p><a class="reference internal" href="#focus-commands" id="id70">Focus commands</a></p></li>
<li><p><a class="reference internal" href="#pane-commands" id="id71">Pane commands</a></p></li>
</ul>
</li>
<li><p><a class="reference internal" href="#id9" id="id72">Outline commands</a></p>
<ul>
<li><p><a class="reference internal" href="#creating-cloning-destroying-nodes" id="id73">Creating, cloning &amp; destroying nodes</a></p></li>
<li><p><a class="reference internal" href="#expanding-contracting-nodes" id="id74">Expanding &amp; contracting nodes</a></p></li>
<li><p><a class="reference internal" href="#editing-headlines" id="id75">Editing headlines</a></p></li>
<li><p><a class="reference internal" href="#selecting-nodes" id="id76">Selecting nodes</a></p></li>
<li><p><a class="reference internal" href="#cutting-pasting-deleting-nodes" id="id77">Cutting, pasting &amp; deleting nodes</a></p></li>
<li><p><a class="reference internal" href="#moving-reorganizing-nodes" id="id78">Moving &amp; reorganizing nodes</a></p></li>
<li><p><a class="reference internal" href="#converting-between-outlines-and-text" id="id79">Converting between outlines and text</a></p></li>
<li><p><a class="reference internal" href="#dragging-nodes" id="id80">Dragging nodes</a></p></li>
<li><p><a class="reference internal" href="#marking-nodes" id="id81">Marking nodes</a></p></li>
<li><p><a class="reference internal" href="#operations-on-marked-nodes" id="id82">Operations on marked nodes</a></p></li>
<li><p><a class="reference internal" href="#comparing-outlines" id="id83">Comparing outlines</a></p></li>
<li><p><a class="reference internal" href="#using-chapters" id="id84">Using Chapters</a></p></li>
</ul>
</li>
<li><p><a class="reference internal" href="#plugins-commands" id="id85">Plugins commands</a></p></li>
<li><p><a class="reference internal" href="#search-spell-commands" id="id86">Search &amp; spell commands</a></p>
<ul>
<li><p><a class="reference internal" href="#basic-searches" id="id87">Basic searches</a></p></li>
<li><p><a class="reference internal" href="#incremental-find-commands" id="id88">Incremental find commands</a></p></li>
<li><p><a class="reference internal" href="#word-search-and-regex-search-commands" id="id89">Word search and regex search commands</a></p></li>
<li><p><a class="reference internal" href="#check-boxes-and-their-commands" id="id90">Check boxes and their commands</a></p></li>
<li><p><a class="reference internal" href="#radio-buttons-and-their-commands" id="id91">Radio buttons and their commands</a></p></li>
<li><p><a class="reference internal" href="#spell-commands" id="id92">Spell commands</a></p></li>
</ul>
</li>
<li><p><a class="reference internal" href="#settings-commands" id="id93">Settings commands</a></p></li>
<li><p><a class="reference internal" href="#code-beautification-commands" id="id94">Code beautification commands</a></p>
<ul>
<li><p><a class="reference internal" href="#comparison-with-black" id="id95">Comparison with Black</a></p></li>
<li><p><a class="reference internal" href="#beautifier-directives" id="id96">Beautifier directives</a></p></li>
<li><p><a class="reference internal" href="#stand-alone-beautifier" id="id97">Stand-alone beautifier</a></p></li>
</ul>
</li>
<li><p><a class="reference internal" href="#window-related-commands" id="id98">Window-related commands</a></p></li>
<li><p><a class="reference internal" href="#vim-mode-commands" id="id99">Vim mode commands</a></p></li>
</ul>
</li>
<li><p><a class="reference internal" href="#key-reference" id="id100">Key Reference</a></p>
<ul>
<li><p><a class="reference internal" href="#id14" id="id101">Selecting outline nodes</a></p></li>
<li><p><a class="reference internal" href="#moving-outline-nodes" id="id102">Moving outline nodes</a></p></li>
<li><p><a class="reference internal" href="#id15" id="id103">Moving the cursor</a></p></li>
</ul>
</li>
</ul>
</div>
<section id="executing-commands-from-the-minibuffer">
<h2><a class="toc-backref" href="#id16">Executing commands from the minibuffer</a><a class="headerlink" href="#executing-commands-from-the-minibuffer" title="Permalink to this heading">¶</a></h2>
<p>Leo’s minibuffer appears at the bottom of Leo’s main window. You use the minibuffer to execute commands by name, and also to accumulate arguments to commands.</p>
<p>Every Leo command has a <strong>command name</strong>. In this document, keystrokes that invoke a command will be followed by the command name in parentheses. For example, <code class="docutils literal notranslate"><span class="pre">Ctrl-S</span> <span class="pre">(save-file)</span></code> saves a Leo file.</p>
<p><strong>Very Important</strong>: Leo has hundreds of commands, but because of tab completion you do not have to remember, or even <em>know about</em> any of them.  Feel free to ignore commands that you don’t use. The following prefixes help find commands by name:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">clone</span><span class="o">-</span><span class="n">find</span>  <span class="n">clone</span><span class="o">-</span><span class="n">find</span> <span class="n">commands</span>
<span class="n">file</span><span class="o">-</span>       <span class="n">file</span> <span class="n">commands</span>
<span class="n">find</span><span class="o">-</span>       <span class="n">find</span> <span class="n">commands</span>
<span class="n">isearch</span><span class="o">-</span>    <span class="n">incremental</span> <span class="n">search</span> <span class="n">commands</span>
<span class="n">leo</span><span class="o">-</span>        <span class="nb">open</span> <span class="o">.</span><span class="n">leo</span> <span class="n">files</span>
<span class="nb">open</span><span class="o">-</span>       <span class="nb">open</span> <span class="n">files</span> <span class="ow">or</span> <span class="n">url</span><span class="s1">&#39;s</span>
<span class="nb">print</span><span class="o">-</span>      <span class="nb">print</span> <span class="n">commands</span>
<span class="n">rectangle</span><span class="o">-</span>  <span class="n">rectangle</span> <span class="n">commands</span>
<span class="n">sort</span><span class="o">-</span>       <span class="n">sort</span> <span class="n">commands</span>
<span class="n">toggle</span><span class="o">-</span>     <span class="n">toggle</span> <span class="n">settings</span> <span class="n">commands</span>
</pre></div>
</div>
<p>Here are the commands that pertain to executing commands:</p>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">Alt-X</span> <span class="pre">(full-command)</span></code></dt><dd><p>Executes any other command by typing its full name.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">Ctrl-P</span> <span class="pre">(repeat-complex-command</span></code></dt><dd><p>Repeats the last command entered by name in the minibuffer.</p>
</dd>
</dl>
<p>When in the minibuffer, the following keys are treated in special ways:</p>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">&lt;Return&gt;</span></code></dt><dd><p>Executes the command.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">&lt;Tab&gt;</span></code></dt><dd><p>Shows all valid completions.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">&lt;BackSpace&gt;</span></code></dt><dd><p>Shows more completions.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">Ctrl-G</span></code></dt><dd><p>Exits the minibuffer and puts focus in the body pane.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">UpArrow</span></code></dt><dd><p>Moves backward through command history. The first <code class="docutils literal notranslate"><span class="pre">UpArrow</span></code> is the same as <code class="docutils literal notranslate"><span class="pre">Ctrl-P</span></code>.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">DownArrow</span></code></dt><dd><p>Moves forward through command history.</p>
</dd>
</dl>
<section id="typing-completion">
<h3><a class="toc-backref" href="#id17">Typing completion</a><a class="headerlink" href="#typing-completion" title="Permalink to this heading">¶</a></h3>
<p><strong>Very Important</strong>: Leo has hundreds of commands, but because of tab completion you do not have to remember, or even <em>know about</em> any of them.  Feel free to ignore commands that you don’t use.</p>
<p>You could type the full command name in the minibuffer, followed by the <code class="docutils literal notranslate"><span class="pre">&lt;Return&gt;</span></code> key to invoke the command, but that would be <em>way</em> too much work. Instead, you can avoid most typing using <strong>tab completion</strong>. With tab completion, <em>there is no need to remember the exact names of Leo’s commands</em>.</p>
<p>For example, suppose you want to print out the list of Leo’s commands. You might remember only that there are several related commands and that they all start with “print”. Just type <code class="docutils literal notranslate"><span class="pre">&lt;Alt-X&gt;pri&lt;Tab&gt;</span></code></p>
<p>You will see <code class="docutils literal notranslate"><span class="pre">print-</span></code> in the minibuffer. This is the longest common prefix of all the command names that start with <code class="docutils literal notranslate"><span class="pre">pri</span></code>. The Completion tab in the log pane shows all the commands that start with <code class="docutils literal notranslate"><span class="pre">print-</span></code>.</p>
<p>Now just type <code class="docutils literal notranslate"><span class="pre">c&lt;Tab&gt;</span></code> You will see the <code class="docutils literal notranslate"><span class="pre">print-commands</span></code> command in the minibuffer.</p>
<p>Finally, <code class="docutils literal notranslate"><span class="pre">&lt;Return&gt;</span></code> executes the <code class="docutils literal notranslate"><span class="pre">print-commands</span></code> command. The output of the print-commands command appears in the commands tab, and focus returns to the body pane.</p>
</section>
<section id="filename-completion">
<h3><a class="toc-backref" href="#id18">Filename completion</a><a class="headerlink" href="#filename-completion" title="Permalink to this heading">¶</a></h3>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">file-open-by-name</span></code></dt><dd><p>Prompts for a filename. This command completes the name of files and directories as in command completion.  As a result, this command can be very fast.  You may want to bind this command to <code class="docutils literal notranslate"><span class="pre">Ctrl-O</span></code> instead of the default <code class="docutils literal notranslate"><span class="pre">open-outline</span></code> command.</p>
</dd>
</dl>
</section>
</section>
<section id="most-important-commands">
<h2><a class="toc-backref" href="#id19">Most important commands</a><a class="headerlink" href="#most-important-commands" title="Permalink to this heading">¶</a></h2>
<section id="file-operations-sessions">
<h3><a class="toc-backref" href="#id20">File operations &amp; sessions</a><a class="headerlink" href="#file-operations-sessions" title="Permalink to this heading">¶</a></h3>
<p>Here are Leo’s basic file commands:</p>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">Ctrl-N</span> <span class="pre">(new)</span></code></dt><dd><p>Creates a new outline in a new tab.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">Ctrl-O</span> <span class="pre">(open-outline)</span></code></dt><dd><p>Opens an existing .leo file.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">Ctrl-S</span> <span class="pre">(save-file)</span></code></dt><dd><p>Saves the outline.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">Ctrl-Q</span> <span class="pre">(exit-leo)</span></code></dt><dd><p>Exits Leo.  Leo will prompt you to save any unsaved outlines.</p>
</dd>
</dl>
<p>A <strong>session</strong> specifies a list of .leo files that Leo opens automatically when Leo first starts.  Leo will reload the last session provided that command-line arguments <em>don’t</em> contain any file names.</p>
</section>
<section id="switching-focus">
<h3><a class="toc-backref" href="#id21">Switching focus</a><a class="headerlink" href="#switching-focus" title="Permalink to this heading">¶</a></h3>
<p>Here’s how to switch focus without using the mouse:</p>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">Alt-0</span> <span class="pre">(vr-toggle)</span></code></dt><dd><p>Hides or shows the viewrendered pane.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">Alt-T</span> <span class="pre">(focus-to-tree)</span></code></dt><dd><p>Puts focus in the outline pane, regardless of focus.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">Ctrl-T</span> <span class="pre">(toggle-active-pane)</span></code></dt><dd><p>Toggles focus between the outline and body panes.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">Ctrl-Tab</span> <span class="pre">(tab-cycle-next)</span></code></dt><dd><p>Switches between outline tabs. You may open multiple Leo outlines in different tabs within the same main window.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">Ctrl-G</span> <span class="pre">(keyboard-quit)</span></code></dt><dd><p>Puts focus in the body pane. More effective than hitting Alt-Tab twice.</p>
</dd>
</dl>
</section>
<section id="outline-commands">
<h3><a class="toc-backref" href="#id22">Outline commands</a><a class="headerlink" href="#outline-commands" title="Permalink to this heading">¶</a></h3>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">Ctrl-I</span> <span class="pre">or</span> <span class="pre">Insert</span> <span class="pre">(insert-node)</span></code></dt><dd><p>Inserts a new node into the outline.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">Ctrl-H</span> <span class="pre">(edit-headline)</span></code></dt><dd><p>Begins editing the headline of the selected node.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">Return</span></code></dt><dd><p>When focus is in the outline pane, <code class="docutils literal notranslate"><span class="pre">&lt;Return&gt;</span></code> ends editing <code class="docutils literal notranslate"><span class="pre">(end-edit-headline)</span></code> or switches focus to the body pane.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">Ctrl-Shift-C</span> <span class="pre">(copy-node)</span></code></dt><dd><p>Copies the outline and all it’s descendants, placing the node on the clipboard.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">Ctrl-Shift-X</span> <span class="pre">(cut-node)</span></code></dt><dd><p>Cuts the outline and all its descendants, placing the node on the clipboard.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">Ctrl-Shift-V</span> <span class="pre">(paste-node)</span></code></dt><dd><p>Pastes a node (and its descendants) from the clipboard after the presently selected node.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">Ctrl-M</span> <span class="pre">(mark)</span></code></dt><dd><p>Toggles the mark on a node. Marked nodes have a vertical red bar in their icon area.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">Ctrl-}</span> <span class="pre">(demote)</span></code></dt><dd><p>Makes all following siblings of a node children of the node. Use <code class="docutils literal notranslate"><span class="pre">demote</span></code> to “gather” nodes so they can all be moved with their parent.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">Ctrl-{</span> <span class="pre">(promote)</span></code></dt><dd><p>Makes all the children of a node siblings of the node. Use <code class="docutils literal notranslate"><span class="pre">demote</span></code> to “scatter” the nodes after moving their parent.</p>
</dd>
</dl>
</section>
<section id="selecting-outline-nodes">
<h3><a class="toc-backref" href="#id23">Selecting outline nodes</a><a class="headerlink" href="#selecting-outline-nodes" title="Permalink to this heading">¶</a></h3>
<p>You may select, expand and contract outline nodes with the mouse as usual, but using arrow keys is <em>highly recommended</em>. When focus is in the outline pane, <em>plain</em> arrows keys change the selected node:</p>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">Right-arrow</span> <span class="pre">(expand-and-go-right)</span></code></dt><dd><p>Expands a node or selects its first child.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">Left-arrow</span> <span class="pre">(contract-or-go-left)</span></code></dt><dd><p>Contracts a node if its children are visible, and selects the node’s parent otherwise.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">Up-arrow</span> <span class="pre">(goto-prev-visible)</span></code></dt><dd><p>Selects the previous <em>visible</em> outline node.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">Down-arrow</span> <span class="pre">(goto-next-visible)</span></code></dt><dd><p>Selects the next <em>visible</em> outline node.</p>
</dd>
</dl>
<p>Regardless of focus, <code class="docutils literal notranslate"><span class="pre">Alt-arrow</span></code> select outline nodes:</p>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">Alt-Home</span> <span class="pre">(goto-first-visible-node)</span></code></dt><dd><p>Selects the first outline node and collapses all nodes.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">Alt-End</span> <span class="pre">(goto-last-visible-node)</span></code></dt><dd><p>Selects the last <em>visible</em> outline node and collapses all nodes except the node and its ancestors.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">Alt-arrow</span> <span class="pre">keys</span></code></dt><dd><p>Select the outline pane, and then act just like the plain arrow keys when the outline pane has focus.</p>
</dd>
</dl>
</section>
<section id="moving-the-cursor">
<h3><a class="toc-backref" href="#id24">Moving the cursor</a><a class="headerlink" href="#moving-the-cursor" title="Permalink to this heading">¶</a></h3>
<p>When focus is in any of Leo’s text panes (body pane, log pane, headlines), Leo works like most text editors:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">Plain</span> <span class="pre">arrow</span></code> keys move the cursor up, down, left or right.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">Ctrl-LeftArrow</span></code> and <code class="docutils literal notranslate"><span class="pre">Ctrl-RightArrow</span></code> move the cursor by words.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">Home</span></code> and <code class="docutils literal notranslate"><span class="pre">End</span></code> move the cursor to the beginning or end of a line.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">Ctrl-Home</span></code> moves the cursor to the beginning of the body text.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">Ctrl-End</span></code> moves the cursor to the end of the body text.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">PageDown</span></code> and <code class="docutils literal notranslate"><span class="pre">PageUp</span></code> move the cursor up or down one page.</p></li>
</ul>
<p><strong>Note</strong>: As usual, adding the <code class="docutils literal notranslate"><span class="pre">Shift</span></code> key modifier to any of the keys above moves the cursor and extends the selected text.</p>
</section>
<section id="finding-replacing-text">
<h3><a class="toc-backref" href="#id25">Finding &amp; replacing text</a><a class="headerlink" href="#finding-replacing-text" title="Permalink to this heading">¶</a></h3>
<p>This section explains how to use Leo’s standard search/replace commands.
<strong>Note</strong>: you can also use the Nav Tab (in the Log pane) to search for text.</p>
<p><code class="docutils literal notranslate"><span class="pre">Ctrl-F</span> <span class="pre">(start-search)</span></code> shows the Find Tab and puts the focus in the text box labeled <code class="docutils literal notranslate"><span class="pre">Find:</span></code>.</p>
<p><strong>Aside</strong>: You can select radio buttons and toggle check boxes in the Find Tab with <code class="docutils literal notranslate"><span class="pre">Ctrl-Alt</span> <span class="pre">keys</span></code>. The capitalized words of the radio buttons or check boxes indicate which key to use.  For example, <code class="docutils literal notranslate"><span class="pre">Ctrl-Alt-X</span> <span class="pre">(toggle-find-regex-option)</span></code> toggles the <code class="docutils literal notranslate"><span class="pre">regeXp</span></code> checkbox.</p>
<p>After typing <code class="docutils literal notranslate"><span class="pre">Ctrl-F</span></code>, type the search string, say <code class="docutils literal notranslate"><span class="pre">def</span></code>, in the text box.</p>
<p>Start the find command by typing <code class="docutils literal notranslate"><span class="pre">&lt;Return&gt;</span></code>.</p>
<p>But suppose you want to replace <code class="docutils literal notranslate"><span class="pre">def</span></code> with <code class="docutils literal notranslate"><span class="pre">foo</span></code>, instead of just finding <code class="docutils literal notranslate"><span class="pre">def</span></code>.</p>
<p>Just type <code class="docutils literal notranslate"><span class="pre">&lt;Tab&gt;</span></code> before typing <code class="docutils literal notranslate"><span class="pre">&lt;Return&gt;</span></code>. Focus shifts to the text box labeled <code class="docutils literal notranslate"><span class="pre">Replace:</span></code>.</p>
<p>Finally, type <code class="docutils literal notranslate"><span class="pre">&lt;Return&gt;</span></code> to start the find-next command. When Leo finds the next instance of <code class="docutils literal notranslate"><span class="pre">def</span></code>, it will select it.</p>
<p>You may now type any command.  The following are most useful:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">Ctrl-minus</span> <span class="pre">(replace-then-find)</span></code> replaces the selected text.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">F3</span> <span class="pre">(find-next)</span></code> continues searching without making a replacement.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">F2</span> <span class="pre">(find-previous)</span></code> continues the search in reverse.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">Ctrl-G</span> <span class="pre">(keyboard-quit)</span></code> ends the search.</p></li>
</ul>
</section>
<section id="formatting-text">
<h3><a class="toc-backref" href="#id26">Formatting text</a><a class="headerlink" href="#formatting-text" title="Permalink to this heading">¶</a></h3>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">rst3</span></code></dt><dd><p>Converts &#64;rst nodes to restructured text. This command automatically creates underlining for rST sections. To reorganize a document, just reorganize the corresponding Leo outline: you don’t have to change markup by hand. Search or “rst” in leoSettings.leo to see the pertinent settings.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">adoc</span></code></dt><dd><p>Converts &#64;adoc nodes to asciidoc text. This command automatically creates markup for asciidoctor sections. To reorganize a document, just reorganize the corresponding Leo outline: you don’t have to change markup by hand.</p>
</dd>
</dl>
</section>
<section id="undoing-and-redoing-changes">
<h3><a class="toc-backref" href="#id27">Undoing and redoing changes</a><a class="headerlink" href="#undoing-and-redoing-changes" title="Permalink to this heading">¶</a></h3>
<p>Leo has unlimited undo–Leo remembers <em>all</em> changes you make to outline structure or the contents of any node since you restarted Leo.</p>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">Ctrl-Z</span> <span class="pre">(undo)</span></code></dt><dd><p>Undoes the last change. Another Ctrl-Z undoes the previous change, etc.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">Ctrl-Shift-Z</span> <span class="pre">(redo)</span></code></dt><dd><p>Undoes the effect of the last undo, etc.</p>
</dd>
</dl>
<p>The first two entries of the <code class="docutils literal notranslate"><span class="pre">Edit</span></code> menu show what the next undo or redo operation will be.</p>
</section>
<section id="clone-find-commands">
<h3><a class="toc-backref" href="#id28">Clone-find commands</a><a class="headerlink" href="#clone-find-commands" title="Permalink to this heading">¶</a></h3>
<p>The <strong>clone find</strong> commands, cfa and cff are extraordinarily useful. These commands move clones of all nodes matching the search pattern under a single <strong>organizer node</strong>, created as the last top-level node. <strong>Flattened</strong> searches put all nodes as direct children of the organizer node:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">cfa</span>     <span class="n">clone</span><span class="o">-</span><span class="n">find</span><span class="o">-</span><span class="nb">all</span>
<span class="n">cff</span>     <span class="n">clone</span><span class="o">-</span><span class="n">find</span><span class="o">-</span><span class="nb">all</span><span class="o">-</span><span class="n">flattened</span>
</pre></div>
</div>
<p>The <strong>clone-marked</strong> commands move clones of all marked nodes under an organizer node. Especially useful for gathering nodes by hand:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">cfam</span>    <span class="n">clone</span><span class="o">-</span><span class="n">find</span><span class="o">-</span><span class="n">marked</span>
<span class="n">cffm</span>    <span class="n">clone</span><span class="o">-</span><span class="n">find</span><span class="o">-</span><span class="n">flattened</span><span class="o">-</span><span class="n">marked</span>
</pre></div>
</div>
</section>
<section id="syncing-clean-files">
<h3><a class="toc-backref" href="#id29">Syncing &#64;clean files</a><a class="headerlink" href="#syncing-clean-files" title="Permalink to this heading">¶</a></h3>
<p>The <strong>check-nodes</strong> command finds <strong>dubious</strong> nodes, that is, nodes that:</p>
<ul class="simple">
<li><p>contain multiple defs.</p></li>
<li><p>start with leading blank lines.</p></li>
<li><p>are non-organizer nodes containing no body text.</p></li>
</ul>
<p>This command is specially useful when using &#64;clean nodes in a collaborative
environment. Leo’s &#64;clean update algorithm will update &#64;clean nodes when
others have added, deleted or moved code, but the update algorithm won’t
assign changed code to the optimal nodes. This script highlights nodes that
needed attention.</p>
<p><strong>Settings</strong>: You can customize the behavior of this command with &#64;data nodes:</p>
<ul>
<li><p>&#64;data check-nodes-ok-patterns</p>
<p>The body of the &#64;data node contains a list of regexes (strings), one per
line. This command compiles each regex as if it were a raw string.
Headlines matching any of these compiled regexes are not considered
dubious. The defaults ignore unit tests:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">.*</span><span class="n">test_</span>
<span class="o">.*</span><span class="n">Test</span>
</pre></div>
</div>
</li>
<li><p>&#64;data check-nodes-ok-prefixes</p>
<p>The body of the &#64;data node contains a list of strings, one per line.
Headlines starting with any of these strings are not considered dubious.
The defaults ignore top-level &#64;&lt;file&gt; nodes and marker nodes:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">@</span>
<span class="o">**</span>
<span class="o">==</span>
<span class="o">--</span>
</pre></div>
</div>
</li>
<li><p>&#64;data check-nodes-suppressions</p>
<p>The body of the &#64;data node contains a list of strings, one per line.
Headlines that match these suppressions <em>exactly</em> are not considered
dubious. Default: None.</p>
</li>
</ul>
</section>
<section id="help-commands">
<h3><a class="toc-backref" href="#id30">Help commands</a><a class="headerlink" href="#help-commands" title="Permalink to this heading">¶</a></h3>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">F1</span> <span class="pre">(help)</span></code></dt><dd><p>Shows a help message appears in the viewrendered pane. Alt-0 (vr-toggle) hides or shows this pane.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">F11</span> <span class="pre">(help-for-command)</span></code></dt><dd><p>Shows the documentation for any Leo command. <code class="docutils literal notranslate"><span class="pre">F11</span></code> prompts for the name of a Leo command in the minibuffer. Use tab completion to see the list of all commands that start with a given prefix.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">F12</span> <span class="pre">(help-for-python)</span></code></dt><dd><p>Shows the documentation from Python’s help system. Typing completion is not available: type the full name of any Python module, class, function or statement.</p>
</dd>
</dl>
<p>These commands clarify which settings are in effect, and where they came from:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="nb">print</span><span class="o">-</span><span class="n">bindings</span>
<span class="nb">print</span><span class="o">-</span><span class="n">settings</span>
</pre></div>
</div>
<p>These commands discuss special topics:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">help</span><span class="o">-</span><span class="k">for</span><span class="o">-</span><span class="n">abbreviations</span>
<span class="n">help</span><span class="o">-</span><span class="k">for</span><span class="o">-</span><span class="n">autocompletion</span>
<span class="n">help</span><span class="o">-</span><span class="k">for</span><span class="o">-</span><span class="n">bindings</span>
<span class="n">help</span><span class="o">-</span><span class="k">for</span><span class="o">-</span><span class="n">creating</span><span class="o">-</span><span class="n">external</span><span class="o">-</span><span class="n">files</span>
<span class="n">help</span><span class="o">-</span><span class="k">for</span><span class="o">-</span><span class="n">debugging</span><span class="o">-</span><span class="n">commands</span>
<span class="n">help</span><span class="o">-</span><span class="k">for</span><span class="o">-</span><span class="n">drag</span><span class="o">-</span><span class="ow">and</span><span class="o">-</span><span class="n">drop</span>
<span class="n">help</span><span class="o">-</span><span class="k">for</span><span class="o">-</span><span class="n">dynamic</span><span class="o">-</span><span class="n">abbreviations</span>
<span class="n">help</span><span class="o">-</span><span class="k">for</span><span class="o">-</span><span class="n">find</span><span class="o">-</span><span class="n">commands</span>
<span class="n">help</span><span class="o">-</span><span class="k">for</span><span class="o">-</span><span class="n">minibuffer</span>
<span class="n">help</span><span class="o">-</span><span class="k">for</span><span class="o">-</span><span class="n">regular</span><span class="o">-</span><span class="n">expressions</span>
<span class="n">help</span><span class="o">-</span><span class="k">for</span><span class="o">-</span><span class="n">scripting</span>
</pre></div>
</div>
</section>
<section id="debugger-commands">
<h3><a class="toc-backref" href="#id31">Debugger commands</a><a class="headerlink" href="#debugger-commands" title="Permalink to this heading">¶</a></h3>
<dl>
<dt><code class="docutils literal notranslate"><span class="pre">xdb</span></code></dt><dd><p>Start a Leo’s integrated debugger in a separate thread.</p>
<p>Start the debugger from any part of any &#64;&lt;file&gt; tree. Now you are ready
to execute all the db-* commands.</p>
<p>You can execute these commands from the minibuffer, or, if the
xdb_pane.py plugin is enabled, from the the Debug pane.</p>
</dd>
</dl>
<p>The following commands correspond to the pdb commands:</p>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">db-b</span></code></dt><dd><p>Set a breakpoint at the line shown in Leo.
It should be an executable line.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">db-c</span></code></dt><dd><p>Continue, that is, run until the next breakpoint.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">db-h</span></code></dt><dd><p>Print the help message (in the console, for now)</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">db-l</span></code></dt><dd><p>List a few lines around present location.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">db-n</span></code></dt><dd><p>Execute the next line.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">db-q</span></code></dt><dd><p>End the debugger.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">db-r</span></code></dt><dd><p>Return from the present function/method.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">db-s</span></code></dt><dd><p>Step into the next line.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">db-w</span></code></dt><dd><p>Print the stack.</p>
</dd>
</dl>
<p>There are two additional commands:</p>
<dl>
<dt><code class="docutils literal notranslate"><span class="pre">db-again</span></code></dt><dd><p>Run the previous db-command.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">db-input</span></code></dt><dd><p>Prompt for any pdb command, then execute it.</p>
<p>The db-input command allows you can enter any pdb command at all.
For example: “print c”.</p>
</dd>
</dl>
<p>But you don’t have to run these commands from the minibuffer, as discussed next.</p>
<p><strong>Setting breakpoints in the gutter</strong></p>
<p>When &#64;bool use_gutter = True, Leo shows a border in the body pane.  By default, the line-numbering.py plugin is enabled, and if so, the gutter shows correct line number in the external file.</p>
<p>After executing the xdb command, you can set a breakpoint on any executable line by clicking in the gutter to the right of the line number.  You can also set a breakpoint any time the debugger is stopped.</p>
<p>Using the gutter is optional. You can also set breakpoints with the db-b command or by typing “d line-number” or “d file-name:line-number using the db-input command, or by using the Debug pane (see below)</p>
<p><strong>The Debug pane</strong></p>
<p>The xdb_pane.py plugin creates the Debug pane in the Log pane.  The pane contains buttons corresponding to all the commands listed above.  In addition, there is an input area in which you can enter pdb commands. This is a bit easier to use than the db-input command.</p>
<p><strong>Settings</strong></p>
<p>When &#64;bool use_xdb_pane_output_area is True, all debugger output is sent to an output area in the Debug pane. The default is True, so you need this setting only if you don’t want output set to the Debug pane.</p>
</section>
<section id="operations-on-reference-leo-files">
<h3><a class="toc-backref" href="#id32">Operations on reference .leo files</a><a class="headerlink" href="#operations-on-reference-leo-files" title="Permalink to this heading">¶</a></h3>
<p>These commands make it easier to use Leo’s <a class="reference external" href="FAQ.html#what-is-a-reference-leo-file">reference .leo files</a>. From time to time, developers needs to open reference Leo file and copy its content to and from their personal file. These commands use a <strong>separation node</strong>, a top-level node whose headline is:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">---</span><span class="n">begin</span><span class="o">-</span><span class="n">private</span><span class="o">-</span><span class="n">area</span><span class="o">---</span>
</pre></div>
</div>
<p>The body of the separation node contains the <strong>.leo reference</strong>, a path to the reference .leo file. Everything above this node is the <strong>public part</strong> of the outline.  Everything below this node is the <strong>private part</strong> of the outline.</p>
<p><strong>set-reference-file</strong> selects the reference .leo file corresponding to the local .leo file. It creates the separation node if it doesn’t exists, changing the .leo reference as needed.</p>
<p><strong>read-ref-file</strong> reads the public part of this outline from the reference .leo file given in the separation node. <strong>Warning</strong>: This command <strong>deletes all nodes above separation node</strong>, recreating them from the reference file.</p>
<p><strong>update-ref-file</strong> saves public part of this outline to reference .leo file.</p>
<p>Developers will typically execute the read-ref-file command after any git pull that changes any reference .leo file.  Similarly, devs will typically execute the update-ref-file command before doing a git commit that changes a reference .leo file.</p>
</section>
</section>
<section id="all-other-commands">
<h2><a class="toc-backref" href="#id33">All other commands</a><a class="headerlink" href="#all-other-commands" title="Permalink to this heading">¶</a></h2>
<section id="id1">
<h3><a class="toc-backref" href="#id34">Clone-find commands</a><a class="headerlink" href="#id1" title="Permalink to this heading">¶</a></h3>
<p>The <strong>clone find</strong> commands, cfa and cff,  move clones of all nodes matching the search pattern under a single <strong>organizer node</strong>, created as the last top-level node. <strong>Flattened</strong> searches put all nodes as direct children of the organizer node:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">cfa</span>     <span class="n">clone</span><span class="o">-</span><span class="n">find</span><span class="o">-</span><span class="nb">all</span>
<span class="n">cff</span>     <span class="n">clone</span><span class="o">-</span><span class="n">find</span><span class="o">-</span><span class="nb">all</span><span class="o">-</span><span class="n">flattened</span>
</pre></div>
</div>
<p>The <strong>clone-marked</strong> commands move clones of all marked nodes under an organizer node. Especially useful for gathering nodes by hand:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">cfam</span>    <span class="n">clone</span><span class="o">-</span><span class="n">find</span><span class="o">-</span><span class="n">marked</span>
<span class="n">cffm</span>    <span class="n">clone</span><span class="o">-</span><span class="n">find</span><span class="o">-</span><span class="n">flattened</span><span class="o">-</span><span class="n">marked</span>
</pre></div>
</div>
<p>The <cite>clone-find-parents</cite> command creates clones of all parent nodes of c.p.</p>
<p>The <cite>clone-find-tag</cite> aka <code class="docutils literal notranslate"><span class="pre">(cft)</span></code> command creates clones of all nodes having a given tag.</p>
<p>The <cite>tag-children</cite> applies a given tag to all the children of the selected node.</p>
</section>
<section id="debug-commands">
<h3><a class="toc-backref" href="#id35">Debug commands</a><a class="headerlink" href="#debug-commands" title="Permalink to this heading">¶</a></h3>
<div class="contents local topic" id="id2">
<p class="topic-title">Contents</p>
<ul class="simple">
<li><p><a class="reference internal" href="#running-external-debuggers" id="id104">Running External debuggers</a></p></li>
<li><p><a class="reference internal" href="#printing-settings-and-other-data" id="id105">Printing settings and other data</a></p></li>
<li><p><a class="reference internal" href="#other-debugging-commands" id="id106">Other debugging commands</a></p></li>
</ul>
</div>
<section id="running-external-debuggers">
<h4><a class="toc-backref" href="#id104">Running External debuggers</a><a class="headerlink" href="#running-external-debuggers" title="Permalink to this heading">¶</a></h4>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">flake8</span></code></dt><dd><p>Run flake8 on all nodes of the selected tree, or the first ancestor &#64;&lt;file&gt; node.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">pyflakes</span></code></dt><dd><p>Runs pyflakes on the Python source files in the selected tree, or the first ancestor &#64;&lt;file&gt; node. Prints results in the console window and Leo’s log pane.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">pylint</span></code></dt><dd><p>Runs pylint on the Python source files in the selected tree, or the first ancestor &#64;&lt;file&gt; node. This command is also available from the popup menus created by the contextmenu plugin.</p>
</dd>
</dl>
</section>
<section id="printing-settings-and-other-data">
<h4><a class="toc-backref" href="#id105">Printing settings and other data</a><a class="headerlink" href="#printing-settings-and-other-data" title="Permalink to this heading">¶</a></h4>
<p>The following print information to Leo’s log pane:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="nb">print</span><span class="o">-</span><span class="n">bindings</span>
<span class="nb">print</span><span class="o">-</span><span class="n">commands</span>
<span class="nb">print</span><span class="o">-</span><span class="n">focus</span>
<span class="nb">print</span><span class="o">-</span><span class="n">plugin</span><span class="o">-</span><span class="n">handlers</span>
<span class="nb">print</span><span class="o">-</span><span class="n">plugins</span><span class="o">-</span><span class="n">info</span>
<span class="nb">print</span><span class="o">-</span><span class="n">settings</span>
<span class="nb">print</span><span class="o">-</span><span class="n">style</span><span class="o">-</span><span class="n">sheet</span>
<span class="n">show</span><span class="o">-</span><span class="n">colors</span>
<span class="n">show</span><span class="o">-</span><span class="n">find</span><span class="o">-</span><span class="n">options</span>
</pre></div>
</div>
</section>
<section id="other-debugging-commands">
<h4><a class="toc-backref" href="#id106">Other debugging commands</a><a class="headerlink" href="#other-debugging-commands" title="Permalink to this heading">¶</a></h4>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">check-derived-file</span></code></dt><dd><p>Makes sure an external file written by Leo can be read properly.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">check-leo-file</span></code></dt><dd><p>Performs a full check of the consistency of a .leo file.  As of Leo 5.1, Leo performs checks of gnx’s and outline structure before writes and after reads, pastes and undo/redo.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">check-outline</span></code></dt><dd><p>Checks the outline for consistency. Leo automatically checks the syntax of Python external files when Leo writes the external file.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">clear-all-caches</span></code></dt><dd><p>Clear all file caches in g.app.leoHomeDir/db</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">clear-cache</span></code></dt><dd><p>Clear the outline’s file cache.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">escape</span></code></dt><dd><p>Enter watch escape mode.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">find-long-lines</span></code></dt><dd><p>Report lines longer than specified by:
&#64;bool max-find-long-lines-length = 110</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">find-missing-docstrings</span></code></dt><dd><p>Report python classes, functions and methods lacking python docstrings.
Does not report nodes that are descendants of &#64;nopylint.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">pdb</span></code></dt><dd><p>Drops into debugger, in the middle of the command-handling logic. Get the commander by stepping out into k.masterKeyHandler or k.masterCommandHandler. Using c, one can then get all other info.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">show-buttons</span></code></dt><dd><p>Show all &#64;button and &#64;command commands, their bindings and their source.</p>
</dd>
</dl>
<p>Dumping Leo’s internal data:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">dump</span><span class="o">-</span><span class="nb">all</span><span class="o">-</span><span class="n">objects</span>
<span class="n">dump</span><span class="o">-</span><span class="n">new</span><span class="o">-</span><span class="n">objects</span>
<span class="n">dump</span><span class="o">-</span><span class="n">outline</span>
<span class="n">verbose</span><span class="o">-</span><span class="n">dump</span><span class="o">-</span><span class="n">objects</span>
</pre></div>
</div>
<p>Python’s garbage collector:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">gc</span><span class="o">-</span><span class="n">collect</span><span class="o">-</span><span class="n">garbage</span>
<span class="n">gc</span><span class="o">-</span><span class="n">dump</span><span class="o">-</span><span class="nb">all</span><span class="o">-</span><span class="n">objects</span>
<span class="n">gc</span><span class="o">-</span><span class="n">dump</span><span class="o">-</span><span class="n">objects</span><span class="o">-</span><span class="n">verbose</span>
<span class="n">gc</span><span class="o">-</span><span class="nb">print</span><span class="o">-</span><span class="n">summary</span>
<span class="n">gc</span><span class="o">-</span><span class="n">trace</span><span class="o">-</span><span class="n">disable</span>
<span class="n">gc</span><span class="o">-</span><span class="n">trace</span><span class="o">-</span><span class="n">enable</span>
</pre></div>
</div>
<p>Idle time:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">disable</span><span class="o">-</span><span class="n">idle</span><span class="o">-</span><span class="n">time</span><span class="o">-</span><span class="n">events</span>
<span class="n">enable</span><span class="o">-</span><span class="n">idle</span><span class="o">-</span><span class="n">time</span><span class="o">-</span><span class="n">events</span>
<span class="n">toggle</span><span class="o">-</span><span class="n">idle</span><span class="o">-</span><span class="n">time</span><span class="o">-</span><span class="n">events</span>
</pre></div>
</div>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">print-window-state</span></code></dt><dd><p>This command is for Leo’s developers.</p>
</dd>
</dl>
</section>
</section>
<section id="edit-commands">
<h3><a class="toc-backref" href="#id39">Edit commands</a><a class="headerlink" href="#edit-commands" title="Permalink to this heading">¶</a></h3>
<div class="contents local topic" id="id3">
<p class="topic-title">Contents</p>
<ul class="simple">
<li><p><a class="reference internal" href="#cutting-pasting-and-selecting-text" id="id107">Cutting, pasting and selecting text</a></p></li>
<li><p><a class="reference internal" href="#indenting-body-text" id="id108">Indenting body text</a></p></li>
<li><p><a class="reference internal" href="#adding-and-deleting-comments-in-body-text" id="id109">Adding and deleting comments in body text</a></p></li>
<li><p><a class="reference internal" href="#id4" id="id110">Moving the cursor</a></p></li>
<li><p><a class="reference internal" href="#text-formatting-commands" id="id111">Text formatting commands</a></p></li>
<li><p><a class="reference internal" href="#creating-nodes-from-body-text" id="id112">Creating nodes from body text</a></p></li>
<li><p><a class="reference internal" href="#executing-python-scripts-in-body-text" id="id113">Executing Python scripts in body text</a></p></li>
<li><p><a class="reference internal" href="#multiple-body-editors" id="id114">Multiple body editors</a></p></li>
<li><p><a class="reference internal" href="#undoing-changes" id="id115">Undoing changes</a></p></li>
</ul>
</div>
<section id="cutting-pasting-and-selecting-text">
<h4><a class="toc-backref" href="#id107">Cutting, pasting and selecting text</a><a class="headerlink" href="#cutting-pasting-and-selecting-text" title="Permalink to this heading">¶</a></h4>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">cut-text</span> <span class="pre">(Ctrl-X)</span></code></dt><dd><p>Cut the selected text and put it to the clipboard.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">copy-text</span> <span class="pre">(Ctrl-C)</span></code></dt><dd><p>Copy the selected text to the clipboard.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">paste-text</span> <span class="pre">(Ctrl-V)</span></code></dt><dd><p>Paste test from the clipboard.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">select-all(Ctrl-A)</span></code></dt><dd><p>Select all text in the text pane.</p>
</dd>
</dl>
<p>These commands work with either headline or body text.</p>
</section>
<section id="indenting-body-text">
<h4><a class="toc-backref" href="#id108">Indenting body text</a><a class="headerlink" href="#indenting-body-text" title="Permalink to this heading">¶</a></h4>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">always-indent-region</span></code></dt><dd><p>Shift selected lines right one tab position. Inserts one unit of indentation if no text is selected.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">indent-region</span> <span class="pre">(Tab)</span></code></dt><dd><p>Shift selected lines right one tab position. Inserts a tab (or spaces) if no text is selected.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">unindent-region</span> <span class="pre">(Shift-Tab)</span></code></dt><dd><p>Shifts selected lines left one tab position. Deletes one unit of indentation if no text is selected.</p>
</dd>
</dl>
<p><strong>Notes</strong>:</p>
<ul class="simple">
<li><p>These commands shift the entire line if any characters in that line are selected. If no text is selected.</p></li>
<li><p>The &#64;tabwidth directive determines which characters these commands insert or delete.</p></li>
<li><p>Leo auto indents unless &#64;nocolor is in effect.  Typing a newline automatically inserts the same leading whitespace present on the previous line.</p></li>
<li><p>If Python is the present language, Leo inserts an additional tab if the previous line ends with a colon.  When the <code class="docutils literal notranslate"><span class="pre">smart_auto_indent</span> <span class="pre">setting</span></code> is True, Leo uses Emacs-style auto-indentation instead.  This style of auto-indent aligns newly created lines with unmatched <code class="docutils literal notranslate"><span class="pre">(</span> <span class="pre">[{</span></code> brackets in the previous line.</p></li>
</ul>
</section>
<section id="adding-and-deleting-comments-in-body-text">
<h4><a class="toc-backref" href="#id109">Adding and deleting comments in body text</a><a class="headerlink" href="#adding-and-deleting-comments-in-body-text" title="Permalink to this heading">¶</a></h4>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">add-comments</span> <span class="pre">(Ctrl-))</span></code></dt><dd><p>Adds comments to the selected lines, according to the &#64;language
directive in effect. These commands use single-line comments if
possible. It’s not necessary to select all of the first or last lines.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">delete-comments</span> <span class="pre">(Ctrl-()</span></code></dt><dd><p>Deletes comments in the selected lines.</p>
</dd>
</dl>
</section>
<section id="id4">
<h4><a class="toc-backref" href="#id110">Moving the cursor</a><a class="headerlink" href="#id4" title="Permalink to this heading">¶</a></h4>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">goto-global-line</span> <span class="pre">(Alt-G)</span></code></dt><dd><p>Selects the locations in your outlines corresponding to a line in a external file.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">match-brackets</span></code></dt><dd><p>Enabled if the cursor is next to one of these characters in the body pane: <code class="docutils literal notranslate"><span class="pre">(</span> <span class="pre">)</span> <span class="pre">[</span> <span class="pre">]</span> <span class="pre">{</span> <span class="pre">}</span> <span class="pre">&lt;</span> <span class="pre">&gt;</span></code> The command looks for the matching character, searching backwards through the body text if the cursor is next to <code class="docutils literal notranslate"><span class="pre">)</span></code> <code class="docutils literal notranslate"><span class="pre">]</span></code> <code class="docutils literal notranslate"><span class="pre">}</span></code> or <code class="docutils literal notranslate"><span class="pre">&gt;</span></code> and searching forward through the text otherwise. If the cursor is between two brackets the search is made for the bracket matching the leftmost bracket. If a match is found, the entire range of characters delimited by the brackets is highlighted and the cursor is placed just to the left of the matching characters. Thus, executing this command twice highlights the range of matched characters without changing the cursor.</p>
</dd>
</dl>
</section>
<section id="text-formatting-commands">
<h4><a class="toc-backref" href="#id111">Text formatting commands</a><a class="headerlink" href="#text-formatting-commands" title="Permalink to this heading">¶</a></h4>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">clean-lines</span></code></dt><dd><p>Removes trailing whitespace from all lines, preserving newlines.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">clear-selected-text</span></code></dt><dd><p>Delete the selected text.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">convert-tabs</span></code></dt><dd><p>Converts leading tabs to blanks in a single node.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">convert-blanks</span></code></dt><dd><p>Converts blanks to tabs in a single node.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">convert-all-tabs</span></code></dt><dd><p>Converts leading tabs to blanks throughout the selected tree.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">convert-all-blanks</span></code></dt><dd><p>Converts leading blanks to tabs throughout the selected tree.</p>
</dd>
</dl>
<p><strong>&#64;tabwidth</strong>: The <code class="docutils literal notranslate"><span class="pre">convert-*</span></code> commands convert between tabs and blanks using the &#64;tabwidth setting presently in effect.</p>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">insert-body-time</span></code> and <code class="docutils literal notranslate"><span class="pre">insert-headline-time</span></code></dt><dd><p>Insert formatted time and date into body or headline text. You must be editing a headline to be able to insert the time/date into the headline. The body_time_format_string and headline_time_format_string settings specify the format of the inserted text. These settings are the format string passed to time.strftime.</p>
</dd>
</dl>
<p><strong>Time format</strong>: For format options see <a class="reference external" href="http://www.python.org/doc/current/lib/module-time.html">Python’s time module</a>. By default, the commands use <code class="docutils literal notranslate"><span class="pre">%m/%d/%Y</span> <span class="pre">%H:%M:%S</span></code>, giving timestamps like <code class="docutils literal notranslate"><span class="pre">1/30/2003</span> <span class="pre">8:31:55</span></code>.</p>
<dl>
<dt><code class="docutils literal notranslate"><span class="pre">pretty-print-python-code</span></code> and <code class="docutils literal notranslate"><span class="pre">pretty-print-all-python-code</span></code></dt><dd><p>Pretty prints body text. You can customize this code by overriding the following methods of class prettyPrinter in leoCommands.py:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">putOperator</span><span class="p">:</span>      <span class="n">puts</span> <span class="n">whitespace</span> <span class="n">around</span> <span class="n">operators</span><span class="o">.</span>
<span class="n">putNormalToken</span><span class="p">:</span>   <span class="n">puts</span> <span class="n">whitespace</span> <span class="n">around</span> <span class="n">everything</span> <span class="k">else</span><span class="o">.</span>
</pre></div>
</div>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">reformat-paragraph</span> <span class="pre">(Ctrl-Shift-P)</span></code></dt><dd><p>Rearranges the words in a text paragraph to fill each line as full as possible, up to the &#64;pagewidth setting. A paragraph is delimited by blank lines, Leo directives, and (of course) start and end of text in a node. The width of the line used by the reformatting operation is governed by &#64;pagewidth and the indentation that would be applied to the node when Leo writes the file.</p>
</dd>
</dl>
<p>The command operates on the paragraph containing the insert cursor. If the insert cursor is on a blank line or directive, nothing happens. If the cursor is on a line containing text, then the paragraph containing that text line is reformatted and the insert cursor is moved to the next paragraph.</p>
<p><strong>Note</strong>: Hanging indentation is preserved. This is most useful for bulleted or numbered lists, such as:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="mf">1.</span> <span class="n">This</span> <span class="ow">is</span> <span class="n">the</span> <span class="n">first</span> <span class="n">paragraph</span><span class="p">,</span>
   <span class="ow">and</span> <span class="n">it</span> <span class="n">has</span> <span class="n">a</span> <span class="n">hanging</span> <span class="n">indentation</span><span class="o">.</span>

<span class="mf">2.</span> <span class="n">This</span> <span class="ow">is</span> <span class="n">the</span> <span class="n">second</span> <span class="n">paragraph</span><span class="p">,</span>
   <span class="ow">and</span> <span class="n">it</span> <span class="n">too</span> <span class="n">has</span> <span class="n">a</span> <span class="n">hanging</span> <span class="n">indentation</span><span class="o">.</span>
</pre></div>
</div>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">replace-current-character</span></code></dt><dd><p>Replace the selected character with the next character typed.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">toggle-angle-brackets</span></code></dt><dd><p>Adds or removes double angle brackets from the headline of the selected node.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">unformat-paragraph</span> <span class="pre">(Ctrl-Shift-U)</span></code></dt><dd><p>Removes all extra whitespace from a paragraph, including leading whitespace.  This command is useful when &#64;wrap is in effect.</p>
</dd>
</dl>
</section>
<section id="creating-nodes-from-body-text">
<h4><a class="toc-backref" href="#id112">Creating nodes from body text</a><a class="headerlink" href="#creating-nodes-from-body-text" title="Permalink to this heading">¶</a></h4>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">extract</span> <span class="pre">(Ctrl-Shift-D)</span></code></dt><dd><p>Creates a new node whose headline is the first line of selected body text and whose body is all other lines of selected text. Previously selected text is deleted from the original body text.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">extract-names</span> <span class="pre">(Ctrl-Shift-N)</span></code></dt><dd><p>Creates one or more child nodes, one for each section name in the selected body text. The headline of each created node is the section name.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">line-to-headline</span></code></dt><dd><p>Creates a new node whose headline is the selected body line.</p>
</dd>
</dl>
</section>
<section id="executing-python-scripts-in-body-text">
<h4><a class="toc-backref" href="#id113">Executing Python scripts in body text</a><a class="headerlink" href="#executing-python-scripts-in-body-text" title="Permalink to this heading">¶</a></h4>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">execute-script</span> <span class="pre">(Ctrl-B)</span></code></dt><dd><p>Executes body text as a Python script. Leo execute the selected text, or the entire body text if no text is selected. The Execute Script command pre-defines the values c, g and p as follows:</p>
</dd>
</dl>
<ul class="simple">
<li><p>c is the commander of the outline containing the script.</p></li>
<li><p>g is the leoGlobals modules.</p></li>
<li><p>p is c.p, that is, c.currentPosition().</p></li>
</ul>
<p><strong>Important</strong>: Body text may contain Leo directives and section references. You can use all of Leo’s features to organize scripts that you execute interactively. Section definitions must appear in the node containing the script or in descendant nodes.</p>
<p>Leo preprocesses all scripts by simulating the writing of a external file to a string. The <code class="docutils literal notranslate"><span class="pre">execute-script</span></code> command sets app.scriptDict[“script1”] to the value of the script before preprocessing, and sets app.scriptDict[“script2”] to the value of the script after preprocessing. Scripts may examine and change app.scriptDict as they please.</p>
</section>
<section id="multiple-body-editors">
<h4><a class="toc-backref" href="#id114">Multiple body editors</a><a class="headerlink" href="#multiple-body-editors" title="Permalink to this heading">¶</a></h4>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">add-editor</span></code></dt><dd><p>Adds a new editor in the body pane and gives it the body editor focus.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">delete-editor</span></code></dt><dd><p>Deletes the editor with body editor focus.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">cycle-editor-focus</span></code></dt><dd><p>Cycles body editor focus between editors in the body text. The editor that has focus shows the content of the selected outline node; the other body editors continue to show the node contents they last had when they had the body editor focus.</p>
</dd>
</dl>
</section>
<section id="undoing-changes">
<h4><a class="toc-backref" href="#id115">Undoing changes</a><a class="headerlink" href="#undoing-changes" title="Permalink to this heading">¶</a></h4>
<p>Leo supports unlimited undo and redo with the <code class="docutils literal notranslate"><span class="pre">undo</span></code> (Ctrl-Z) and <code class="docutils literal notranslate"><span class="pre">redo</span></code> (Ctrl-Shift-Z) commands. Think of actions that may be undone or redone as a string of beads. A “bead pointer” points to the present bead. Performing an operation creates a new bead after the present bead and removes all following beads. Undoing an operation moves the bead pointer backwards; redoing an operation moves the bead pointer forwards. The <code class="docutils literal notranslate"><span class="pre">undo</span></code> command is disabled when the bead pointer moves in front of the first bead; the <code class="docutils literal notranslate"><span class="pre">redo</span></code> command is disabled when the bead pointer points to the last bead.</p>
<p>The &#64;string undo_granularity setting controls the granularity of undo. There are four possible values:</p>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">node</span></code></dt><dd><p>Starts a new undo unit when typing moves to a new node.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">line</span> <span class="pre">(default)</span></code></dt><dd><p>Starts a new undo unit when typing moves to new line.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">word</span></code></dt><dd><p>Starts a new undo unit when typing starts a new word.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">char</span></code> (not recommended)</dt><dd><p>Starts a new undo unit for each character typed.
This wastes lots of computer memory.</p>
</dd>
</dl>
</section>
</section>
<section id="emacs-like-commands">
<h3><a class="toc-backref" href="#id49">Emacs-like commands</a><a class="headerlink" href="#emacs-like-commands" title="Permalink to this heading">¶</a></h3>
<div class="contents local topic" id="id5">
<p class="topic-title">Contents</p>
<ul class="simple">
<li><p><a class="reference internal" href="#abbreviation-commands" id="id116">Abbreviation commands</a></p></li>
<li><p><a class="reference internal" href="#cursor-movement-commands" id="id117">Cursor movement commands</a></p></li>
<li><p><a class="reference internal" href="#emacs-text-formatting" id="id118">Emacs text formatting</a></p></li>
<li><p><a class="reference internal" href="#rectangle-commands" id="id119">Rectangle commands</a></p></li>
<li><p><a class="reference internal" href="#scrolling-the-outline-pane" id="id120">Scrolling the outline pane</a></p></li>
<li><p><a class="reference internal" href="#yank-kill-delete-commands" id="id121">Yank, kill &amp; delete commands</a></p></li>
</ul>
</div>
<section id="abbreviation-commands">
<h4><a class="toc-backref" href="#id116">Abbreviation commands</a><a class="headerlink" href="#abbreviation-commands" title="Permalink to this heading">¶</a></h4>
<p><strong>Important</strong>: The following describes Leo’s new abbreviation scheme.  Such abbreviations <em>fire immediately</em> whenever they are completed. You do <em>not</em> have to execute a command!  By convention, abbreviations end with <code class="docutils literal notranslate"><span class="pre">;;</span></code>, something you are not likely to type by accident, but you can pick any abbreviation you like.</p>
<p><strong>Note</strong>:</p>
<ol class="arabic">
<li><p>The &#64;data abbreviations-subst-env node contains a script defining the environment in which all abbreviations execute. This allows helper functions to be defined. Very handy.</p></li>
<li><p>Scripts may span multiple lines. Line starting with “:” (2 characters) continue a script. This allows abbreviations to define multi-line templates.  Helpers defined in &#64;data abbreviations-subst-env can fill in templates with <em>calculated</em> (not predefined) data.</p></li>
<li><p>Templates may contain placeholders that the user can fill in.  By default, the double comma binding selects the next placeholder.</p></li>
<li><p>Added a new setting: &#64;bool scripting-abbreviations, default False. Scripting abbreviations will be enabled if <em>either</em> of the following is True:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="nd">@bool</span> <span class="n">scripting</span><span class="o">-</span><span class="n">abbreviations</span>
<span class="nd">@bool</span> <span class="n">scripting</span><span class="o">-</span><span class="n">at</span><span class="o">-</span><span class="n">script</span><span class="o">-</span><span class="n">nodes</span>
</pre></div>
</div>
</li>
</ol>
<p>This is a safety feature: it allows scripting abbreviations to be enabled <em>without</em> enabling the (very dangerous in general) scripting-at-script-nodes setting.</p>
<ol class="arabic simple" start="5">
<li><p>Added a new example node: &#64;&#64;data abbreviations examples.  This contains
several extremely useful scripts.</p></li>
</ol>
<p>Leo also supports <a class="reference external" href="http://www.gnu.org/software/emacs/manual/html_node/emacs/Abbrevs.html#Abbrevs">Emacs-like abbreviation commands</a>:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">dabbrev</span><span class="o">-</span><span class="n">completion</span>
<span class="n">dabbrev</span><span class="o">-</span><span class="n">expands</span>
</pre></div>
</div>
</section>
<section id="cursor-movement-commands">
<h4><a class="toc-backref" href="#id117">Cursor movement commands</a><a class="headerlink" href="#cursor-movement-commands" title="Permalink to this heading">¶</a></h4>
<p><strong>Smart cursor moves</strong>: Many editors allow you to jump over, select and delete words, especially those containing or surrounded by special characters, in a smarter way than just “going to the beginning of the word before” (back-word) or “going to the end of the next word” (forward-word):</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">back</span><span class="o">-</span><span class="n">word</span><span class="o">-</span><span class="n">smart</span>
<span class="n">back</span><span class="o">-</span><span class="n">word</span><span class="o">-</span><span class="n">smart</span><span class="o">-</span><span class="n">extend</span><span class="o">-</span><span class="n">selection</span>
<span class="n">forward</span><span class="o">-</span><span class="n">word</span><span class="o">-</span><span class="n">smart</span>
<span class="n">forward</span><span class="o">-</span><span class="n">word</span><span class="o">-</span><span class="n">smart</span><span class="o">-</span><span class="n">extend</span><span class="o">-</span><span class="n">selection</span>
<span class="n">delete</span><span class="o">-</span><span class="n">word</span><span class="o">-</span><span class="n">smart</span>
<span class="n">backward</span><span class="o">-</span><span class="n">delete</span><span class="o">-</span><span class="n">word</span><span class="o">-</span><span class="n">smart</span>
</pre></div>
</div>
<p>The following commands work much like the <a class="reference external" href="http://www.gnu.org/software/emacs/manual/html_node/emacs/Moving-Point.html#Moving-Point">Emacs cursor commands</a>:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">back</span><span class="o">-</span><span class="n">char</span>
<span class="n">back</span><span class="o">-</span><span class="n">char</span><span class="o">-</span><span class="n">extend</span><span class="o">-</span><span class="n">selection</span>
<span class="n">back</span><span class="o">-</span><span class="n">page</span>
<span class="n">back</span><span class="o">-</span><span class="n">page</span><span class="o">-</span><span class="n">extend</span><span class="o">-</span><span class="n">selection</span>
<span class="n">back</span><span class="o">-</span><span class="n">paragraph</span>
<span class="n">back</span><span class="o">-</span><span class="n">paragraph</span><span class="o">-</span><span class="n">extend</span><span class="o">-</span><span class="n">selection</span>
<span class="n">back</span><span class="o">-</span><span class="n">sentence</span>
<span class="n">back</span><span class="o">-</span><span class="n">sentence</span><span class="o">-</span><span class="n">extend</span><span class="o">-</span><span class="n">selection</span>
<span class="n">back</span><span class="o">-</span><span class="n">to</span><span class="o">-</span><span class="n">home</span>
<span class="n">back</span><span class="o">-</span><span class="n">to</span><span class="o">-</span><span class="n">home</span><span class="o">-</span><span class="n">extend</span><span class="o">-</span><span class="n">selection</span>
<span class="n">back</span><span class="o">-</span><span class="n">to</span><span class="o">-</span><span class="n">indentation</span>
<span class="n">back</span><span class="o">-</span><span class="n">word</span><span class="o">-</span><span class="n">extend</span><span class="o">-</span><span class="n">selection</span>
<span class="n">backward</span><span class="o">-</span><span class="n">delete</span><span class="o">-</span><span class="n">char</span>
<span class="n">backward</span><span class="o">-</span><span class="n">find</span><span class="o">-</span><span class="n">character</span>
<span class="n">backward</span><span class="o">-</span><span class="n">find</span><span class="o">-</span><span class="n">character</span><span class="o">-</span><span class="n">extend</span><span class="o">-</span><span class="n">selection</span>
<span class="n">backward</span><span class="o">-</span><span class="n">kill</span><span class="o">-</span><span class="n">paragraph</span>
<span class="n">backward</span><span class="o">-</span><span class="n">kill</span><span class="o">-</span><span class="n">sentence</span>
<span class="n">backward</span><span class="o">-</span><span class="n">kill</span><span class="o">-</span><span class="n">word</span>
<span class="n">beginning</span><span class="o">-</span><span class="n">of</span><span class="o">-</span><span class="n">buffer</span>
<span class="n">beginning</span><span class="o">-</span><span class="n">of</span><span class="o">-</span><span class="n">buffer</span><span class="o">-</span><span class="n">extend</span><span class="o">-</span><span class="n">selection</span>
<span class="n">beginning</span><span class="o">-</span><span class="n">of</span><span class="o">-</span><span class="n">line</span>
<span class="n">beginning</span><span class="o">-</span><span class="n">of</span><span class="o">-</span><span class="n">line</span><span class="o">-</span><span class="n">extend</span><span class="o">-</span><span class="n">selection</span>
<span class="n">end</span><span class="o">-</span><span class="n">of</span><span class="o">-</span><span class="n">buffer</span>
<span class="n">end</span><span class="o">-</span><span class="n">of</span><span class="o">-</span><span class="n">buffer</span><span class="o">-</span><span class="n">extend</span><span class="o">-</span><span class="n">selection</span>
<span class="n">end</span><span class="o">-</span><span class="n">of</span><span class="o">-</span><span class="n">line</span>
<span class="n">end</span><span class="o">-</span><span class="n">of</span><span class="o">-</span><span class="n">line</span><span class="o">-</span><span class="n">extend</span><span class="o">-</span><span class="n">selection</span>
<span class="n">find</span><span class="o">-</span><span class="n">character</span>
<span class="n">find</span><span class="o">-</span><span class="n">character</span><span class="o">-</span><span class="n">extend</span><span class="o">-</span><span class="n">selection</span>
<span class="n">find</span><span class="o">-</span><span class="n">word</span><span class="o">-</span><span class="ow">in</span><span class="o">-</span><span class="n">line</span>
<span class="n">forward</span><span class="o">-</span><span class="n">char</span>
<span class="n">forward</span><span class="o">-</span><span class="n">char</span><span class="o">-</span><span class="n">extend</span><span class="o">-</span><span class="n">selection</span>
<span class="n">forward</span><span class="o">-</span><span class="n">end</span><span class="o">-</span><span class="n">word</span>
<span class="n">forward</span><span class="o">-</span><span class="n">end</span><span class="o">-</span><span class="n">word</span><span class="o">-</span><span class="n">extend</span><span class="o">-</span><span class="n">selection</span>
<span class="n">forward</span><span class="o">-</span><span class="n">page</span>
<span class="n">forward</span><span class="o">-</span><span class="n">page</span><span class="o">-</span><span class="n">extend</span><span class="o">-</span><span class="n">selection</span>
<span class="n">forward</span><span class="o">-</span><span class="n">paragraph</span>
<span class="n">forward</span><span class="o">-</span><span class="n">paragraph</span><span class="o">-</span><span class="n">extend</span><span class="o">-</span><span class="n">selection</span>
<span class="n">forward</span><span class="o">-</span><span class="n">sentence</span>
<span class="n">forward</span><span class="o">-</span><span class="n">sentence</span><span class="o">-</span><span class="n">extend</span><span class="o">-</span><span class="n">selection</span>
<span class="n">forward</span><span class="o">-</span><span class="n">word</span><span class="o">-</span><span class="n">extend</span><span class="o">-</span><span class="n">selection</span>
<span class="n">move</span><span class="o">-</span><span class="n">past</span><span class="o">-</span><span class="n">close</span>
<span class="n">move</span><span class="o">-</span><span class="n">past</span><span class="o">-</span><span class="n">close</span><span class="o">-</span><span class="n">extend</span><span class="o">-</span><span class="n">selection</span>
<span class="nb">next</span><span class="o">-</span><span class="n">line</span>
<span class="nb">next</span><span class="o">-</span><span class="n">line</span><span class="o">-</span><span class="n">extend</span><span class="o">-</span><span class="n">selection</span>
<span class="n">previous</span><span class="o">-</span><span class="n">line</span>
<span class="n">previous</span><span class="o">-</span><span class="n">line</span><span class="o">-</span><span class="n">extend</span><span class="o">-</span><span class="n">selection</span>
</pre></div>
</div>
</section>
<section id="emacs-text-formatting">
<h4><a class="toc-backref" href="#id118">Emacs text formatting</a><a class="headerlink" href="#emacs-text-formatting" title="Permalink to this heading">¶</a></h4>
<p>The following commands typically work like the corresponding Emacs command. For details about any command use <code class="docutils literal notranslate"><span class="pre">F11</span> <span class="pre">(help-for-command)</span></code>:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">add</span><span class="o">-</span><span class="n">space</span><span class="o">-</span><span class="n">to</span><span class="o">-</span><span class="n">lines</span>
<span class="n">add</span><span class="o">-</span><span class="n">tab</span><span class="o">-</span><span class="n">to</span><span class="o">-</span><span class="n">lines</span>
<span class="n">align</span><span class="o">-</span><span class="n">eq</span><span class="o">-</span><span class="n">signs</span>
<span class="n">auto</span><span class="o">-</span><span class="n">complete</span>
<span class="n">auto</span><span class="o">-</span><span class="n">complete</span><span class="o">-</span><span class="n">force</span>
<span class="n">capitalize</span><span class="o">-</span><span class="n">word</span>
<span class="n">center</span><span class="o">-</span><span class="n">line</span>
<span class="n">center</span><span class="o">-</span><span class="n">region</span>
<span class="n">clear</span><span class="o">-</span><span class="n">kill</span><span class="o">-</span><span class="n">ring</span>
<span class="n">count</span><span class="o">-</span><span class="n">pages</span>
<span class="n">count</span><span class="o">-</span><span class="n">region</span>
<span class="n">delete</span><span class="o">-</span><span class="n">char</span>
<span class="n">delete</span><span class="o">-</span><span class="n">indentation</span>
<span class="n">delete</span><span class="o">-</span><span class="n">spaces</span>
<span class="n">downcase</span><span class="o">-</span><span class="n">region</span>
<span class="n">downcase</span><span class="o">-</span><span class="n">word</span>
<span class="n">exchange</span><span class="o">-</span><span class="n">point</span><span class="o">-</span><span class="n">mark</span>
<span class="n">extend</span><span class="o">-</span><span class="n">to</span><span class="o">-</span><span class="n">line</span>
<span class="n">extend</span><span class="o">-</span><span class="n">to</span><span class="o">-</span><span class="n">paragraph</span>
<span class="n">extend</span><span class="o">-</span><span class="n">to</span><span class="o">-</span><span class="n">sentence</span>
<span class="n">extend</span><span class="o">-</span><span class="n">to</span><span class="o">-</span><span class="n">word</span>
<span class="n">fill</span><span class="o">-</span><span class="n">paragraph</span>
<span class="n">fill</span><span class="o">-</span><span class="n">region</span>
<span class="n">fill</span><span class="o">-</span><span class="n">region</span><span class="o">-</span><span class="k">as</span><span class="o">-</span><span class="n">paragraph</span>
<span class="n">hide</span><span class="o">-</span><span class="n">invisibles</span>
<span class="n">how</span><span class="o">-</span><span class="n">many</span>
<span class="n">indent</span><span class="o">-</span><span class="n">relative</span>
<span class="n">indent</span><span class="o">-</span><span class="n">rigidly</span>
<span class="n">indent</span><span class="o">-</span><span class="n">to</span><span class="o">-</span><span class="n">comment</span><span class="o">-</span><span class="n">column</span>
<span class="n">insert</span><span class="o">-</span><span class="n">child</span>
<span class="n">insert</span><span class="o">-</span><span class="n">file</span><span class="o">-</span><span class="n">name</span>
<span class="n">insert</span><span class="o">-</span><span class="n">file</span><span class="o">-</span><span class="n">name</span>
<span class="n">insert</span><span class="o">-</span><span class="n">hard</span><span class="o">-</span><span class="n">tab</span>
<span class="n">insert</span><span class="o">-</span><span class="n">newline</span>
<span class="n">insert</span><span class="o">-</span><span class="n">parentheses</span>
<span class="n">insert</span><span class="o">-</span><span class="n">soft</span><span class="o">-</span><span class="n">tab</span>
<span class="n">join</span><span class="o">-</span><span class="n">node</span><span class="o">-</span><span class="n">above</span>
<span class="n">join</span><span class="o">-</span><span class="n">node</span><span class="o">-</span><span class="n">below</span>
<span class="n">join</span><span class="o">-</span><span class="n">selection</span><span class="o">-</span><span class="n">to</span><span class="o">-</span><span class="n">node</span><span class="o">-</span><span class="n">below</span>
<span class="n">line</span><span class="o">-</span><span class="n">number</span>
<span class="n">move</span><span class="o">-</span><span class="n">lines</span><span class="o">-</span><span class="n">down</span>
<span class="n">move</span><span class="o">-</span><span class="n">lines</span><span class="o">-</span><span class="n">up</span>
<span class="n">newline</span><span class="o">-</span><span class="ow">and</span><span class="o">-</span><span class="n">indent</span>
<span class="nb">open</span><span class="o">-</span><span class="n">url</span>
<span class="nb">open</span><span class="o">-</span><span class="n">url</span><span class="o">-</span><span class="n">under</span><span class="o">-</span><span class="n">cursor</span>
<span class="n">remove</span><span class="o">-</span><span class="n">blank</span><span class="o">-</span><span class="n">lines</span>
<span class="n">remove</span><span class="o">-</span><span class="n">newlines</span>
<span class="n">remove</span><span class="o">-</span><span class="n">space</span><span class="o">-</span><span class="n">from</span><span class="o">-</span><span class="n">lines</span>
<span class="n">remove</span><span class="o">-</span><span class="n">tab</span><span class="o">-</span><span class="n">from</span><span class="o">-</span><span class="n">lines</span>
<span class="n">reverse</span><span class="o">-</span><span class="n">region</span>
<span class="n">reverse</span><span class="o">-</span><span class="n">sort</span><span class="o">-</span><span class="n">lines</span>
<span class="n">reverse</span><span class="o">-</span><span class="n">sort</span><span class="o">-</span><span class="n">lines</span><span class="o">-</span><span class="n">ignoring</span><span class="o">-</span><span class="n">case</span>
<span class="n">select</span><span class="o">-</span><span class="n">to</span><span class="o">-</span><span class="n">matching</span><span class="o">-</span><span class="n">bracket</span>
<span class="nb">set</span><span class="o">-</span><span class="n">fill</span><span class="o">-</span><span class="n">column</span>
<span class="nb">set</span><span class="o">-</span><span class="n">fill</span><span class="o">-</span><span class="n">prefix</span>
<span class="n">shell</span><span class="o">-</span><span class="n">command</span>
<span class="n">shell</span><span class="o">-</span><span class="n">command</span><span class="o">-</span><span class="n">on</span><span class="o">-</span><span class="n">region</span>
<span class="n">show</span><span class="o">-</span><span class="n">invisibles</span>
<span class="nb">set</span><span class="o">-</span><span class="n">comment</span><span class="o">-</span><span class="n">column</span>
<span class="n">sort</span><span class="o">-</span><span class="n">columns</span>
<span class="n">sort</span><span class="o">-</span><span class="n">fields</span>
<span class="n">sort</span><span class="o">-</span><span class="n">lines</span>
<span class="n">sort</span><span class="o">-</span><span class="n">lines</span><span class="o">-</span><span class="n">ignoring</span><span class="o">-</span><span class="n">case</span>
<span class="n">split</span><span class="o">-</span><span class="n">line</span>
<span class="n">tabify</span>
<span class="n">transpose</span><span class="o">-</span><span class="n">chars</span>
<span class="n">transpose</span><span class="o">-</span><span class="n">lines</span>
<span class="n">transpose</span><span class="o">-</span><span class="n">words</span>
<span class="n">untabify</span>
<span class="n">upcase</span><span class="o">-</span><span class="n">region</span>
<span class="n">upcase</span><span class="o">-</span><span class="n">word</span>
<span class="n">view</span><span class="o">-</span><span class="n">lossage</span>
<span class="n">what</span><span class="o">-</span><span class="n">line</span>
</pre></div>
</div>
</section>
<section id="rectangle-commands">
<h4><a class="toc-backref" href="#id119">Rectangle commands</a><a class="headerlink" href="#rectangle-commands" title="Permalink to this heading">¶</a></h4>
<p>The following commands emulate the <a class="reference external" href="http://www.gnu.org/software/emacs/manual/html_node/emacs/Rectangles.html">Emacs rectangle commands</a>:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">rectangle</span><span class="o">-</span><span class="n">clear</span>
<span class="n">rectangle</span><span class="o">-</span><span class="n">close</span>
<span class="n">rectangle</span><span class="o">-</span><span class="n">delete</span>
<span class="n">rectangle</span><span class="o">-</span><span class="n">kill</span>
<span class="n">rectangle</span><span class="o">-</span><span class="nb">open</span>
<span class="n">rectangle</span><span class="o">-</span><span class="n">string</span>
<span class="n">rectangle</span><span class="o">-</span><span class="n">yank</span>
</pre></div>
</div>
<p>Given:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">I</span><span class="s1">&#39;m really glad the docs are being updated. I know that&#39;</span><span class="n">s</span> <span class="n">a</span>
<span class="n">monumental</span> <span class="n">task</span><span class="o">.</span> <span class="n">I</span> <span class="n">only</span> <span class="n">use</span> <span class="n">a</span> <span class="n">fraction</span> <span class="n">of</span> <span class="n">Leo</span><span class="s1">&#39;s commands, mostly</span>
<span class="n">because</span> <span class="n">I</span> <span class="n">don</span><span class="s1">&#39;t even know what they&#39;</span><span class="n">re</span> <span class="n">supposed</span> <span class="n">to</span> <span class="n">accomplish</span><span class="o">.</span> <span class="n">A</span> <span class="n">few</span>
<span class="n">examples</span><span class="p">:</span>
</pre></div>
</div>
<p>Placing the cursor immediately before the first “I”, holding shift and moving it to immediately before the word``examples`` selects a zero width rectangle from the beginning to the end of the selection (zero width because the selection starts and ends in the same column.  Then running <code class="docutils literal notranslate"><span class="pre">rectangle-string</span> <span class="pre">[largo]&lt;space&gt;&lt;enter&gt;</span></code> yields:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">[</span><span class="n">largo</span><span class="p">]</span> <span class="n">I</span><span class="s1">&#39;m really glad the docs are being updated. I know that&#39;</span><span class="n">s</span> <span class="n">a</span>
<span class="p">[</span><span class="n">largo</span><span class="p">]</span> <span class="n">monumental</span> <span class="n">task</span><span class="o">.</span> <span class="n">I</span> <span class="n">only</span> <span class="n">use</span> <span class="n">a</span> <span class="n">fraction</span> <span class="n">of</span> <span class="n">Leo</span><span class="s1">&#39;s commands, mostly</span>
<span class="p">[</span><span class="n">largo</span><span class="p">]</span> <span class="n">because</span> <span class="n">I</span> <span class="n">don</span><span class="s1">&#39;t even know what they&#39;</span><span class="n">re</span> <span class="n">supposed</span> <span class="n">to</span> <span class="n">accomplish</span><span class="o">.</span> <span class="n">A</span> <span class="n">few</span>
<span class="p">[</span><span class="n">largo</span><span class="p">]</span> <span class="n">examples</span><span class="p">:</span>
</pre></div>
</div>
</section>
<section id="scrolling-the-outline-pane">
<h4><a class="toc-backref" href="#id120">Scrolling the outline pane</a><a class="headerlink" href="#scrolling-the-outline-pane" title="Permalink to this heading">¶</a></h4>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">scroll</span><span class="o">-</span><span class="n">down</span>
<span class="n">scroll</span><span class="o">-</span><span class="n">down</span><span class="o">-</span><span class="n">extend</span><span class="o">-</span><span class="n">selection</span>
<span class="n">scroll</span><span class="o">-</span><span class="n">up</span>
<span class="n">scroll</span><span class="o">-</span><span class="n">up</span><span class="o">-</span><span class="n">extend</span><span class="o">-</span><span class="n">selection</span>

<span class="n">scroll</span><span class="o">-</span><span class="n">down</span><span class="o">-</span><span class="n">half</span><span class="o">-</span><span class="n">page</span>
<span class="n">scroll</span><span class="o">-</span><span class="n">down</span><span class="o">-</span><span class="n">line</span>
<span class="n">scroll</span><span class="o">-</span><span class="n">down</span><span class="o">-</span><span class="n">page</span>
<span class="n">scroll</span><span class="o">-</span><span class="n">up</span><span class="o">-</span><span class="n">half</span><span class="o">-</span><span class="n">page</span>
<span class="n">scroll</span><span class="o">-</span><span class="n">up</span><span class="o">-</span><span class="n">line</span>
<span class="n">scroll</span><span class="o">-</span><span class="n">up</span><span class="o">-</span><span class="n">page</span>

<span class="n">scroll</span><span class="o">-</span><span class="n">outline</span><span class="o">-</span><span class="n">down</span><span class="o">-</span><span class="n">line</span>
<span class="n">scroll</span><span class="o">-</span><span class="n">outline</span><span class="o">-</span><span class="n">down</span><span class="o">-</span><span class="n">page</span>
<span class="n">scroll</span><span class="o">-</span><span class="n">outline</span><span class="o">-</span><span class="n">up</span><span class="o">-</span><span class="n">line</span>
<span class="n">scroll</span><span class="o">-</span><span class="n">outline</span><span class="o">-</span><span class="n">up</span><span class="o">-</span><span class="n">page</span>
<span class="n">scroll</span><span class="o">-</span><span class="n">outline</span><span class="o">-</span><span class="n">left</span>
<span class="n">scroll</span><span class="o">-</span><span class="n">outline</span><span class="o">-</span><span class="n">right</span>
</pre></div>
</div>
</section>
<section id="yank-kill-delete-commands">
<h4><a class="toc-backref" href="#id121">Yank, kill &amp; delete commands</a><a class="headerlink" href="#yank-kill-delete-commands" title="Permalink to this heading">¶</a></h4>
<p>The following commands typically work like the corresponding Emacs command. For details about any command use <code class="docutils literal notranslate"><span class="pre">F11</span> <span class="pre">(help-for-command)</span></code>:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">backward</span><span class="o">-</span><span class="n">delete</span><span class="o">-</span><span class="n">char</span>
<span class="n">backward</span><span class="o">-</span><span class="n">find</span><span class="o">-</span><span class="n">character</span>
<span class="n">backward</span><span class="o">-</span><span class="n">find</span><span class="o">-</span><span class="n">character</span><span class="o">-</span><span class="n">extend</span><span class="o">-</span><span class="n">selection</span>
<span class="n">backward</span><span class="o">-</span><span class="n">kill</span><span class="o">-</span><span class="n">paragraph</span>
<span class="n">backward</span><span class="o">-</span><span class="n">kill</span><span class="o">-</span><span class="n">sentence</span>
<span class="n">backward</span><span class="o">-</span><span class="n">kill</span><span class="o">-</span><span class="n">word</span>
<span class="n">kill</span><span class="o">-</span><span class="n">line</span>
<span class="n">kill</span><span class="o">-</span><span class="n">paragraph</span>
<span class="n">kill</span><span class="o">-</span><span class="n">region</span>
<span class="n">kill</span><span class="o">-</span><span class="n">region</span><span class="o">-</span><span class="n">save</span>
<span class="n">kill</span><span class="o">-</span><span class="n">sentence</span>
<span class="n">kill</span><span class="o">-</span><span class="n">to</span><span class="o">-</span><span class="n">end</span><span class="o">-</span><span class="n">of</span><span class="o">-</span><span class="n">line</span>
<span class="n">kill</span><span class="o">-</span><span class="n">word</span>
<span class="n">kill</span><span class="o">-</span><span class="n">ws</span>
<span class="n">yank</span>
<span class="n">yank</span><span class="o">-</span><span class="n">pop</span>
<span class="n">zap</span><span class="o">-</span><span class="n">to</span><span class="o">-</span><span class="n">character</span>
</pre></div>
</div>
</section>
</section>
<section id="file-commands">
<h3><a class="toc-backref" href="#id56">File commands</a><a class="headerlink" href="#file-commands" title="Permalink to this heading">¶</a></h3>
<div class="contents local topic" id="id6">
<p class="topic-title">Contents</p>
<ul class="simple">
<li><p><a class="reference internal" href="#loading-saving-reverting-files" id="id122">Loading, saving &amp; reverting files</a></p></li>
<li><p><a class="reference internal" href="#closing-outlines-quitting-leo" id="id123">Closing outlines &amp; quitting Leo</a></p></li>
<li><p><a class="reference internal" href="#importing-exporting-files" id="id124">Importing &amp; exporting files</a></p></li>
<li><p><a class="reference internal" href="#using-sessions" id="id125">Using sessions</a></p></li>
<li><p><a class="reference internal" href="#communicating-with-external-editors" id="id126">Communicating with external editors</a></p></li>
<li><p><a class="reference internal" href="#creating-deleting-directories-files" id="id127">Creating &amp; deleting directories &amp; files</a></p></li>
<li><p><a class="reference internal" href="#managing-recent-files" id="id128">Managing recent files</a></p></li>
</ul>
</div>
<section id="loading-saving-reverting-files">
<h4><a class="toc-backref" href="#id122">Loading, saving &amp; reverting files</a><a class="headerlink" href="#loading-saving-reverting-files" title="Permalink to this heading">¶</a></h4>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">file-open-by-name</span></code></dt><dd><p>Gets the name of a Leo outline from the minibuffer and opens it. File name completion is supported.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">new</span> <span class="pre">(Ctrl-N)</span></code></dt><dd><p>Creates a new Leo main window.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">open-outline</span> <span class="pre">(Ctrl-O)</span></code></dt><dd><p>Opens an existing .leo file. Selecting a non-.leo file loads the file into an &#64;edit node in the present outline.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">open-outline-by-name</span></code></dt><dd><p>Opens the file given by typing the filename in the minibuffer. Supports filename completion.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">read-outline-only</span></code></dt><dd><p>Reads only the .leo file, not any external files.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">revert</span></code></dt><dd><p>Reloads the outline, discarding any changes made since it was last saved.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">save-all</span></code></dt><dd><p>Saves all open tabs windows/tabs.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">save-buffers-kill-leo</span></code></dt><dd><p>Quits Leo, prompting to save any unsaved files first.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">save-file</span> <span class="pre">or</span> <span class="pre">file-save</span> <span class="pre">(Ctrl-S)</span></code></dt><dd><p>Saves the Leo window to a file.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">save-file-as</span></code></dt><dd><p>Saves a copy of the Leo outline, changing outline’s file name.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">save-file-to</span></code></dt><dd><p>Saves a copy of the Leo outline, without changing the outline’s file name</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">save-file-as-zipped</span></code></dt><dd><p>Same as <code class="docutils literal notranslate"><span class="pre">save-file-as</span></code>, compressing the .leo file with Python’s zipfile module.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">save-file-as-unzipped</span></code></dt><dd><p>Same as <code class="docutils literal notranslate"><span class="pre">save-as</span></code>, suppressing compression.</p>
</dd>
</dl>
<p><strong>About compression</strong>: The <code class="docutils literal notranslate"><span class="pre">save-file</span></code>, <code class="docutils literal notranslate"><span class="pre">save-file-as</span></code> and <code class="docutils literal notranslate"><span class="pre">save-file-to</span></code> commands compress the file if it was originally compressed. Leo always uses the .leo extension, regardless of whether the file is zipped. Zipped .leo files contain a single archive, whose name is the same as the .leo file itself. Outside of Leo you can change the extension to .leo.zip and use stuffit or other program to expand the .leo file contained within.</p>
<p><strong>Opening specific files</strong>:</p>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">open-cheat-sheet-leo</span></code></dt><dd><p>Opens CheatSheet.leo in a new tab or window.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">open-leoDocs-leo</span></code></dt><dd><p>Opens LeoDocs.leo in a new tab or window.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">open-scripts-leo</span></code></dt><dd><p>Opens scripts.leo in a new tab or window.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">open-leoSettings-leo</span></code></dt><dd><p>Opens LeoSettings.leo in a new tab or window.</p>
</dd>
</dl>
<p><strong>Writing external files without saving the outline</strong>:</p>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">write-at-auto-nodes</span></code></dt><dd><p>Writes all &#64;auto nodes in the selected tree.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">write-outline-only</span></code></dt><dd><p>Saves the outline without writing any &#64;&lt;file&gt; trees.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">write-at-file-nodes</span></code></dt><dd><p>Writes all &#64;&lt;file&gt; trees.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">write-at-shadow-nodes</span></code></dt><dd><p>Writes all &#64;shadow nodes in the selected tree.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">write-dirty-at-file-nodes</span></code></dt><dd><p>Writes all modified &#64;&lt;file&gt; trees.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">write-dirty-at-shadow-nodes</span></code></dt><dd><p>Writes all modified &#64;shadow trees.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">write-missing-at-file-nodes</span></code></dt><dd><p>Write all &#64;&lt;file&gt; nodes for which the corresponding external file does not exist.</p>
</dd>
</dl>
</section>
<section id="closing-outlines-quitting-leo">
<h4><a class="toc-backref" href="#id123">Closing outlines &amp; quitting Leo</a><a class="headerlink" href="#closing-outlines-quitting-leo" title="Permalink to this heading">¶</a></h4>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">close-others</span></code></dt><dd><p>Closes all windows except the present window.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">close-window</span> <span class="pre">(Ctrl-F4)</span></code></dt><dd><p>Closes the selected Leo window, prompting you to save your work if necessary.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">exit-leo</span> <span class="pre">(Ctrl-Q</span> <span class="pre">or</span> <span class="pre">Alt-F4)</span></code></dt><dd><p>Exits Leo, prompting you to save any changed outline. Closing the last outline tab also exits Leo.</p>
</dd>
</dl>
</section>
<section id="importing-exporting-files">
<h4><a class="toc-backref" href="#id124">Importing &amp; exporting files</a><a class="headerlink" href="#importing-exporting-files" title="Permalink to this heading">¶</a></h4>
<dl>
<dt><code class="docutils literal notranslate"><span class="pre">export-headlines</span></code></dt><dd><p>Exports all headlines to an external file.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">file-insert</span></code></dt><dd><p>Prompts for the name of a file and put the selected text into it.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">flatten-outline</span></code></dt><dd><p>Creates a text file in MORE format from the selected outline.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">import-file</span></code></dt><dd><p>Import a file into an &#64;file node. This command handles files regardless of whether they contain sentinels. This command can also read files in MORE outline format.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">import-MORE-file</span></code></dt><dd><p>Import one or MORE files into &#64;file nodes.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">import-tabbed-files</span></code></dt><dd><p>Import one or more tab-or-space-delimited files into &#64;file nodes.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">import-zim-folder</span></code></dt><dd><p>Imports a zim folder, <a class="reference external" href="http://zim-wiki.org/">http://zim-wiki.org/</a>, as the last top-level node of the outline. This command uses the following Leo settings:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="nd">@int</span> <span class="n">rst_level</span> <span class="o">=</span> <span class="mi">0</span>
<span class="nd">@string</span> <span class="n">rst_type</span>
<span class="nd">@string</span> <span class="n">zim_node_name</span>
<span class="nd">@string</span> <span class="n">path_to_zim</span>
</pre></div>
</div>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">outline-to-cweb</span></code></dt><dd><p>Creates a <a class="reference external" href="http://www-cs-faculty.stanford.edu/~knuth/cweb.html">CWEB</a> file from the selected outline.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">outline-to-noweb</span></code></dt><dd><p>Creates a <a class="reference external" href="https://www.cs.tufts.edu/~nr/noweb/">noweb</a> file from the selected outline.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">read-at-auto-nodes</span></code></dt><dd><p>Reads all &#64;auto nodes in the presently selected outline.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">read-at-shadow-nodes</span></code></dt><dd><p>Reads all &#64;shadow nodes in the presently selected outline.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">read-at-file-nodes</span></code></dt><dd><p>Updates all &#64;&lt;file&gt; nodes in an outline.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">read-file-into-node</span></code></dt><dd><p>Prompts for a filename, creates a new node and puts the contents of the file into its body text.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">refresh-from-disk</span></code></dt><dd><p>Refreshes an &#64;&lt;file&gt; node from disk.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">remove-sentinels</span></code></dt><dd><p>Removes all sentinel lines from a file derived from an &#64;file node.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">weave</span></code></dt><dd><p>Formats the selected text and writes it to a file.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">write-file-from-node</span></code></dt><dd><p>Writes the body text of the selected node to a file. The command prompts for a file name if the node is not an &#64;&lt;file&gt; node.</p>
</dd>
</dl>
</section>
<section id="using-sessions">
<h4><a class="toc-backref" href="#id125">Using sessions</a><a class="headerlink" href="#using-sessions" title="Permalink to this heading">¶</a></h4>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">session-clear</span></code></dt><dd><p>Closes all tabs except the presently selected tab.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">session-create</span></code></dt><dd><p>Creates a new &#64;session node.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">session-refresh</span></code></dt><dd><p>Refreshes the current &#64;session node.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">session-restore</span></code></dt><dd><p>Opens a tab for each item the selected &#64;session node.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">session-snapshot-load</span></code></dt><dd><p>Loads a snapshot of a session from the leo.session file.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">session-snapshot-save</span></code></dt><dd><p>Saves a snapshot of the present session to the leo.session file.</p>
</dd>
</dl>
<p>A <strong>session</strong> specifies a list of .leo files that Leo opens automatically when Leo first starts.  Leo will reload the last session provided that command-line arguments <em>don’t</em> contain any file names.</p>
</section>
<section id="communicating-with-external-editors">
<h4><a class="toc-backref" href="#id126">Communicating with external editors</a><a class="headerlink" href="#communicating-with-external-editors" title="Permalink to this heading">¶</a></h4>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">cm-external-editor</span></code></dt><dd><p>Open the selected node in the external editor specified by the <code class="docutils literal notranslate"><span class="pre">LEO_EDITOR/EDITOR</span></code> environment variable.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">open-with-idle</span></code></dt><dd><p>Open the selected node in <a class="reference external" href="http://en.wikipedia.org/wiki/IDLE_%28Python%29">Idle</a>.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">open-with-open</span> <span class="pre">office</span></code></dt><dd><p>Open the selected node in <a class="reference external" href="https://www.openoffice.org/">Open Office</a>.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">open-with-scite</span></code></dt><dd><p>Open the selected node in <a class="reference external" href="http://www.scintilla.org/SciTE.html">SciTe</a>.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">open-with-word</span></code></dt><dd><p>Open the selected node in Word.</p>
</dd>
</dl>
<p><strong>About open-with</strong>:</p>
<ol class="arabic simple">
<li><p>Leo creates a temporary file and invokes an external program. Leo periodically checks whether this temporary file has changed; Leo changes the corresponding node in the outline if so. You must create the entries using an &#64;openwith node in myLeoSettings.leo. See the documentation there.</p></li>
<li><p>All open-with commands require that the corresponding &#64;openwith node correctly specifies an editor.</p></li>
</ol>
</section>
<section id="creating-deleting-directories-files">
<h4><a class="toc-backref" href="#id127">Creating &amp; deleting directories &amp; files</a><a class="headerlink" href="#creating-deleting-directories-files" title="Permalink to this heading">¶</a></h4>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">directory-make</span></code></dt><dd><p>Prompts for the name of a directory and creates it.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">directory-remove</span></code></dt><dd><p>Prompts for the name of a directory and deletes it.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">file-delete</span></code></dt><dd><p>Prompts for the name of a file and delete it.</p>
</dd>
</dl>
</section>
<section id="managing-recent-files">
<h4><a class="toc-backref" href="#id128">Managing recent files</a><a class="headerlink" href="#managing-recent-files" title="Permalink to this heading">¶</a></h4>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">clean-recent-files</span></code></dt><dd><p>Removes duplicate entries from entries in the Recent Files menu.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">clear-recent-files</span></code></dt><dd><p>Deletes all entries in the Recent Files except the most recent file. The files themselves are not affected.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">sort-recent-files</span></code></dt><dd><p>Sorts the recent files list in the File menu.</p>
</dd>
</dl>
</section>
</section>
<section id="id7">
<h3><a class="toc-backref" href="#id64">Help commands</a><a class="headerlink" href="#id7" title="Permalink to this heading">¶</a></h3>
<dl>
<dt><code class="docutils literal notranslate"><span class="pre">about-leo</span></code></dt><dd><p>Puts up a dialog box showing the version of Leo.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">help</span></code></dt><dd><p>Shows an introduction to Leo’s help system.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">help-for-command</span> <span class="pre">(F11)</span></code></dt><dd><p>Prompts for a Leo command name in the minibuffer (tab completion is allowed) and shows the docstring for the command.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">help-for-python</span> <span class="pre">(F12)</span></code></dt><dd><p>Prompts for a Python module or function and shows its docstring.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">help-for-&lt;topic&gt;</span></code></dt><dd><p>Opens a discussion of a topic:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">help</span><span class="o">-</span><span class="k">for</span><span class="o">-</span><span class="n">abbreviations</span>
<span class="n">help</span><span class="o">-</span><span class="k">for</span><span class="o">-</span><span class="n">autocompletion</span>
<span class="n">help</span><span class="o">-</span><span class="k">for</span><span class="o">-</span><span class="n">bindings</span>
<span class="n">help</span><span class="o">-</span><span class="k">for</span><span class="o">-</span><span class="n">creating</span><span class="o">-</span><span class="n">external</span><span class="o">-</span><span class="n">files</span>
<span class="n">help</span><span class="o">-</span><span class="k">for</span><span class="o">-</span><span class="n">debugging</span><span class="o">-</span><span class="n">commands</span>
<span class="n">help</span><span class="o">-</span><span class="k">for</span><span class="o">-</span><span class="n">drag</span><span class="o">-</span><span class="ow">and</span><span class="o">-</span><span class="n">drop</span>
<span class="n">help</span><span class="o">-</span><span class="k">for</span><span class="o">-</span><span class="n">dynamic</span><span class="o">-</span><span class="n">abbreviations</span>
<span class="n">help</span><span class="o">-</span><span class="k">for</span><span class="o">-</span><span class="n">find</span><span class="o">-</span><span class="n">commands</span>
<span class="n">help</span><span class="o">-</span><span class="k">for</span><span class="o">-</span><span class="n">minibuffer</span>
<span class="n">help</span><span class="o">-</span><span class="k">for</span><span class="o">-</span><span class="n">regular</span><span class="o">-</span><span class="n">expressions</span>
<span class="n">help</span><span class="o">-</span><span class="k">for</span><span class="o">-</span><span class="n">scripting</span>
</pre></div>
</div>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">open-online-home</span></code></dt><dd><p>Opens Leo’s home page at <a class="reference external" href="https://leo-editor.github.io/leo-editor/">https://leo-editor.github.io/leo-editor/</a>.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">open-online-toc</span></code></dt><dd><p>Opens Leo’s table of contents at <a class="reference external" href="https://leo-editor.github.io/leo-editor/leo_toc.html">https://leo-editor.github.io/leo-editor/leo_toc.html</a>.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">open-online-tutorials</span></code></dt><dd><p>Opens Leo’s tutorials page at <a class="reference external" href="https://leo-editor.github.io/leo-editor/tutorial.html">https://leo-editor.github.io/leo-editor/tutorial.html</a>.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">open-online-videos</span></code></dt><dd><p>Opens Leo’s video page at <a class="reference external" href="https://leo-editor.github.io/leo-editor/screencasts.html">https://leo-editor.github.io/leo-editor/screencasts.html</a>.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">open-quickstart-leo</span></code></dt><dd><p>Opens Leo’s quickstart guide in a new tab or window.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">open-users-guide</span></code></dt><dd><p>Opens Leo’s Users Guide at <a class="reference external" href="https://leo-editor.github.io/leo-editor/usersguide.html">https://leo-editor.github.io/leo-editor/usersguide.html</a>.</p>
</dd>
</dl>
</section>
<section id="language-conversion-commands">
<h3><a class="toc-backref" href="#id65">Language conversion commands</a><a class="headerlink" href="#language-conversion-commands" title="Permalink to this heading">¶</a></h3>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">c-to-python</span></code></dt><dd><p>Converts c or c++ text to python text. The conversion is not perfect, but it eliminates a lot of tedious text manipulation.  This command is a rewrapping of the first Python script I ever wrote.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">import-free-mind-files</span></code></dt><dd><p>Prompts for FreeMind files and imports them.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">typescript-to-py</span></code></dt><dd><p>Converts typescript text to python text. The conversion is not perfect, but it eliminates a lot of tedious text manipulation.</p>
</dd>
</dl>
</section>
<section id="minibuffer-commands">
<h3><a class="toc-backref" href="#id66">Minibuffer commands</a><a class="headerlink" href="#minibuffer-commands" title="Permalink to this heading">¶</a></h3>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">eval-expression</span></code></dt><dd><p>Evaluate an expression entered in the minibuffer.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">full-command</span> <span class="pre">(Alt-X)</span></code></dt><dd><p>Execute a command by name. Tab completion is supported.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">keyboard-quit</span></code></dt><dd><p>Exits the minibuffer, putting focus in the body pane.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">repeat-complex-command</span></code></dt><dd><p>Execute the last command entered from the minibuffer.</p>
</dd>
</dl>
</section>
<section id="miscellaneous-commands">
<h3><a class="toc-backref" href="#id67">Miscellaneous commands</a><a class="headerlink" href="#miscellaneous-commands" title="Permalink to this heading">¶</a></h3>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">at</span><span class="o">-</span><span class="n">file</span><span class="o">-</span><span class="n">to</span><span class="o">-</span><span class="n">at</span><span class="o">-</span><span class="n">auto</span>
<span class="n">clean</span><span class="o">-</span><span class="n">persistence</span>
<span class="bp">cls</span>
<span class="n">join</span><span class="o">-</span><span class="n">leo</span><span class="o">-</span><span class="n">irc</span>
<span class="nb">open</span><span class="o">-</span><span class="n">python</span><span class="o">-</span><span class="n">window</span>
<span class="n">script</span><span class="o">-</span><span class="n">button</span>

<span class="c1"># Auto-completion</span>
<span class="o">-</span> <span class="n">show</span><span class="o">-</span><span class="n">calltips</span>
<span class="o">-</span> <span class="n">show</span><span class="o">-</span><span class="n">calltips</span><span class="o">-</span><span class="n">force</span>

<span class="c1"># Fonts.</span>
<span class="nb">set</span><span class="o">-</span><span class="n">font</span>
<span class="n">show</span><span class="o">-</span><span class="n">fonts</span>

<span class="c1"># Icons.</span>
<span class="n">insert</span><span class="o">-</span><span class="n">icon</span>
<span class="n">delete</span><span class="o">-</span><span class="n">first</span><span class="o">-</span><span class="n">icon</span>
<span class="n">delete</span><span class="o">-</span><span class="n">last</span><span class="o">-</span><span class="n">icon</span>
<span class="n">delete</span><span class="o">-</span><span class="n">node</span><span class="o">-</span><span class="n">icons</span>

<span class="c1"># Layout.</span>
<span class="n">free</span><span class="o">-</span><span class="n">layout</span><span class="o">-</span><span class="n">context</span><span class="o">-</span><span class="n">menu</span>
<span class="n">free</span><span class="o">-</span><span class="n">layout</span><span class="o">-</span><span class="n">load</span>
<span class="n">free</span><span class="o">-</span><span class="n">layout</span><span class="o">-</span><span class="n">load</span><span class="o">-</span><span class="n">alternate</span>
<span class="n">free</span><span class="o">-</span><span class="n">layout</span><span class="o">-</span><span class="n">load</span><span class="o">-</span><span class="n">detached</span><span class="o">-</span><span class="n">body</span>
<span class="n">free</span><span class="o">-</span><span class="n">layout</span><span class="o">-</span><span class="n">load</span><span class="o">-</span><span class="n">no</span><span class="o">-</span><span class="n">log</span>
<span class="n">free</span><span class="o">-</span><span class="n">layout</span><span class="o">-</span><span class="n">load</span><span class="o">-</span><span class="n">standard</span>
<span class="n">free</span><span class="o">-</span><span class="n">layout</span><span class="o">-</span><span class="n">restore</span>
<span class="n">free</span><span class="o">-</span><span class="n">layout</span><span class="o">-</span><span class="n">zoom</span>

<span class="c1"># Modes.</span>
<span class="n">enter</span><span class="o">-</span><span class="n">quick</span><span class="o">-</span><span class="n">command</span><span class="o">-</span><span class="n">mode</span>
<span class="n">exit</span><span class="o">-</span><span class="n">named</span><span class="o">-</span><span class="n">mode</span>

<span class="c1"># uA&#39;s.</span>
<span class="n">clear</span><span class="o">-</span><span class="nb">all</span><span class="o">-</span><span class="n">uas</span>
<span class="n">clear</span><span class="o">-</span><span class="n">node</span><span class="o">-</span><span class="n">uas</span>
<span class="n">show</span><span class="o">-</span><span class="nb">all</span><span class="o">-</span><span class="n">uas</span>
<span class="n">show</span><span class="o">-</span><span class="n">node</span><span class="o">-</span><span class="n">uas</span>
<span class="nb">set</span><span class="o">-</span><span class="n">ua</span>
</pre></div>
</div>
</section>
<section id="mouseless-leo-commands">
<h3><a class="toc-backref" href="#id68">Mouseless Leo commands</a><a class="headerlink" href="#mouseless-leo-commands" title="Permalink to this heading">¶</a></h3>
<div class="contents local topic" id="id8">
<p class="topic-title">Contents</p>
<ul class="simple">
<li><p><a class="reference internal" href="#event-simulation-commands" id="id129">Event simulation commands</a></p></li>
<li><p><a class="reference internal" href="#focus-commands" id="id130">Focus commands</a></p></li>
<li><p><a class="reference internal" href="#pane-commands" id="id131">Pane commands</a></p></li>
</ul>
</div>
<section id="event-simulation-commands">
<h4><a class="toc-backref" href="#id129">Event simulation commands</a><a class="headerlink" href="#event-simulation-commands" title="Permalink to this heading">¶</a></h4>
<p>The following commands trigger event hooks:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">click</span><span class="o">-</span><span class="n">click</span><span class="o">-</span><span class="n">box</span>
<span class="n">click</span><span class="o">-</span><span class="n">headline</span>
<span class="n">click</span><span class="o">-</span><span class="n">icon</span><span class="o">-</span><span class="n">box</span>
<span class="n">ctrl</span><span class="o">-</span><span class="n">click</span><span class="o">-</span><span class="n">at</span><span class="o">-</span><span class="n">cursor</span>
<span class="n">ctrl</span><span class="o">-</span><span class="n">click</span><span class="o">-</span><span class="n">icon</span>
<span class="n">double</span><span class="o">-</span><span class="n">click</span><span class="o">-</span><span class="n">headline</span>
<span class="n">double</span><span class="o">-</span><span class="n">click</span><span class="o">-</span><span class="n">icon</span><span class="o">-</span><span class="n">box</span> <span class="c1"># Invokes vim or xemacs plugin if enabled.</span>
<span class="n">simulate</span><span class="o">-</span><span class="n">begin</span><span class="o">-</span><span class="n">drag</span>
<span class="n">simulate</span><span class="o">-</span><span class="n">end</span><span class="o">-</span><span class="n">drag</span>
</pre></div>
</div>
</section>
<section id="focus-commands">
<h4><a class="toc-backref" href="#id130">Focus commands</a><a class="headerlink" href="#focus-commands" title="Permalink to this heading">¶</a></h4>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">activate</span><span class="o">-</span><span class="n">cmds</span><span class="o">-</span><span class="n">menu</span>
<span class="n">activate</span><span class="o">-</span><span class="n">edit</span><span class="o">-</span><span class="n">menu</span>
<span class="n">activate</span><span class="o">-</span><span class="n">file</span><span class="o">-</span><span class="n">menu</span>
<span class="n">activate</span><span class="o">-</span><span class="n">help</span><span class="o">-</span><span class="n">menu</span>
<span class="n">activate</span><span class="o">-</span><span class="n">outline</span><span class="o">-</span><span class="n">menu</span>
<span class="n">activate</span><span class="o">-</span><span class="n">plugins</span><span class="o">-</span><span class="n">menu</span>
<span class="n">activate</span><span class="o">-</span><span class="n">window</span><span class="o">-</span><span class="n">menu</span>
<span class="n">cycle</span><span class="o">-</span><span class="n">focus</span>
<span class="n">cycle</span><span class="o">-</span><span class="n">log</span><span class="o">-</span><span class="n">focus</span>
<span class="n">focus</span><span class="o">-</span><span class="n">to</span><span class="o">-</span><span class="n">body</span>
<span class="n">focus</span><span class="o">-</span><span class="n">to</span><span class="o">-</span><span class="n">find</span>
<span class="n">focus</span><span class="o">-</span><span class="n">to</span><span class="o">-</span><span class="n">log</span>
<span class="n">focus</span><span class="o">-</span><span class="n">to</span><span class="o">-</span><span class="n">minibuffer</span>
<span class="n">focus</span><span class="o">-</span><span class="n">to</span><span class="o">-</span><span class="n">nav</span>
<span class="n">focus</span><span class="o">-</span><span class="n">to</span><span class="o">-</span><span class="n">tree</span>
<span class="n">gui</span><span class="o">-</span><span class="nb">all</span><span class="o">-</span><span class="n">hide</span>
<span class="n">gui</span><span class="o">-</span><span class="nb">all</span><span class="o">-</span><span class="n">show</span>
<span class="n">gui</span><span class="o">-</span><span class="nb">all</span><span class="o">-</span><span class="n">toggle</span>
<span class="n">gui</span><span class="o">-</span><span class="n">iconbar</span><span class="o">-</span><span class="n">hide</span>
<span class="n">gui</span><span class="o">-</span><span class="n">iconbar</span><span class="o">-</span><span class="n">show</span>
<span class="n">gui</span><span class="o">-</span><span class="n">iconbar</span><span class="o">-</span><span class="n">toggle</span>
<span class="n">gui</span><span class="o">-</span><span class="n">menu</span><span class="o">-</span><span class="n">hide</span>
<span class="n">gui</span><span class="o">-</span><span class="n">menu</span><span class="o">-</span><span class="n">show</span>
<span class="n">gui</span><span class="o">-</span><span class="n">menu</span><span class="o">-</span><span class="n">toggle</span>
<span class="n">gui</span><span class="o">-</span><span class="n">minibuffer</span><span class="o">-</span><span class="n">hide</span>
<span class="n">gui</span><span class="o">-</span><span class="n">minibuffer</span><span class="o">-</span><span class="n">show</span>
<span class="n">gui</span><span class="o">-</span><span class="n">minibuffer</span><span class="o">-</span><span class="n">toggle</span>
<span class="n">gui</span><span class="o">-</span><span class="n">statusbar</span><span class="o">-</span><span class="n">hide</span>
<span class="n">gui</span><span class="o">-</span><span class="n">statusbar</span><span class="o">-</span><span class="n">show</span>
<span class="n">gui</span><span class="o">-</span><span class="n">statusbar</span><span class="o">-</span><span class="n">toggle</span>
<span class="n">gui</span><span class="o">-</span><span class="n">tabbar</span><span class="o">-</span><span class="n">hide</span>
<span class="n">gui</span><span class="o">-</span><span class="n">tabbar</span><span class="o">-</span><span class="n">show</span>
<span class="n">gui</span><span class="o">-</span><span class="n">tabbar</span><span class="o">-</span><span class="n">toggle</span>
<span class="n">tab</span><span class="o">-</span><span class="n">cycle</span><span class="o">-</span><span class="nb">next</span>
<span class="n">tab</span><span class="o">-</span><span class="n">cycle</span><span class="o">-</span><span class="n">previous</span>
<span class="n">toggle</span><span class="o">-</span><span class="n">active</span><span class="o">-</span><span class="n">pane</span>
</pre></div>
</div>
</section>
<section id="pane-commands">
<h4><a class="toc-backref" href="#id131">Pane commands</a><a class="headerlink" href="#pane-commands" title="Permalink to this heading">¶</a></h4>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">contract</span><span class="o">-</span><span class="n">body</span><span class="o">-</span><span class="n">pane</span>
<span class="n">contract</span><span class="o">-</span><span class="n">log</span><span class="o">-</span><span class="n">pane</span>
<span class="n">contract</span><span class="o">-</span><span class="n">outline</span><span class="o">-</span><span class="n">pane</span>
<span class="n">contract</span><span class="o">-</span><span class="n">pane</span>
<span class="n">delete</span><span class="o">-</span><span class="n">script</span><span class="o">-</span><span class="n">button</span><span class="o">-</span><span class="n">button</span>
<span class="n">detach</span><span class="o">-</span><span class="n">editor</span><span class="o">-</span><span class="n">toggle</span>
<span class="n">detach</span><span class="o">-</span><span class="n">editor</span><span class="o">-</span><span class="n">toggle</span><span class="o">-</span><span class="nb">max</span>
<span class="n">equal</span><span class="o">-</span><span class="n">sized</span><span class="o">-</span><span class="n">panes</span>
<span class="n">expand</span><span class="o">-</span><span class="n">body</span><span class="o">-</span><span class="n">pane</span>
<span class="n">expand</span><span class="o">-</span><span class="n">log</span><span class="o">-</span><span class="n">pane</span>
<span class="n">expand</span><span class="o">-</span><span class="n">outline</span><span class="o">-</span><span class="n">pane</span>
<span class="n">expand</span><span class="o">-</span><span class="n">pane</span>
<span class="n">fully</span><span class="o">-</span><span class="n">expand</span><span class="o">-</span><span class="n">body</span><span class="o">-</span><span class="n">pane</span>
<span class="n">fully</span><span class="o">-</span><span class="n">expand</span><span class="o">-</span><span class="n">log</span><span class="o">-</span><span class="n">pane</span>
<span class="n">fully</span><span class="o">-</span><span class="n">expand</span><span class="o">-</span><span class="n">outline</span><span class="o">-</span><span class="n">pane</span>
<span class="n">fully</span><span class="o">-</span><span class="n">expand</span><span class="o">-</span><span class="n">pane</span>
<span class="n">hide</span><span class="o">-</span><span class="n">body</span><span class="o">-</span><span class="n">pane</span>
<span class="n">hide</span><span class="o">-</span><span class="n">log</span><span class="o">-</span><span class="n">pane</span>
<span class="n">hide</span><span class="o">-</span><span class="n">outline</span><span class="o">-</span><span class="n">pane</span>
<span class="n">hide</span><span class="o">-</span><span class="n">pane</span>
<span class="n">iconify</span><span class="o">-</span><span class="n">frame</span>
<span class="n">resize</span><span class="o">-</span><span class="n">to</span><span class="o">-</span><span class="n">screen</span>
<span class="n">tab</span><span class="o">-</span><span class="n">detach</span>
</pre></div>
</div>
</section>
</section>
<section id="id9">
<h3><a class="toc-backref" href="#id72">Outline commands</a><a class="headerlink" href="#id9" title="Permalink to this heading">¶</a></h3>
<div class="contents local topic" id="id10">
<p class="topic-title">Contents</p>
<ul class="simple">
<li><p><a class="reference internal" href="#creating-cloning-destroying-nodes" id="id132">Creating, cloning &amp; destroying nodes</a></p></li>
<li><p><a class="reference internal" href="#expanding-contracting-nodes" id="id133">Expanding &amp; contracting nodes</a></p></li>
<li><p><a class="reference internal" href="#editing-headlines" id="id134">Editing headlines</a></p></li>
<li><p><a class="reference internal" href="#selecting-nodes" id="id135">Selecting nodes</a></p></li>
<li><p><a class="reference internal" href="#cutting-pasting-deleting-nodes" id="id136">Cutting, pasting &amp; deleting nodes</a></p></li>
<li><p><a class="reference internal" href="#moving-reorganizing-nodes" id="id137">Moving &amp; reorganizing nodes</a></p></li>
<li><p><a class="reference internal" href="#converting-between-outlines-and-text" id="id138">Converting between outlines and text</a></p></li>
<li><p><a class="reference internal" href="#dragging-nodes" id="id139">Dragging nodes</a></p></li>
<li><p><a class="reference internal" href="#marking-nodes" id="id140">Marking nodes</a></p></li>
<li><p><a class="reference internal" href="#operations-on-marked-nodes" id="id141">Operations on marked nodes</a></p></li>
<li><p><a class="reference internal" href="#comparing-outlines" id="id142">Comparing outlines</a></p></li>
<li><p><a class="reference internal" href="#using-chapters" id="id143">Using Chapters</a></p></li>
</ul>
</div>
<section id="creating-cloning-destroying-nodes">
<h4><a class="toc-backref" href="#id132">Creating, cloning &amp; destroying nodes</a><a class="headerlink" href="#creating-cloning-destroying-nodes" title="Permalink to this heading">¶</a></h4>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">clone-node</span> <span class="pre">(Ctrl-\`)</span></code> (Grave accent, not a single quote)</dt><dd><p>Creates a clone as the immediate sibling of a selected node.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">clone-node-to-last-node</span></code></dt><dd><p>Creates a clone as the last top-level node of the outline.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">insert-node</span> <span class="pre">(Ctrl-I</span> <span class="pre">or</span> <span class="pre">Insert)</span></code></dt><dd><p>Inserts a new node into the outline.  The new node becomes the first child of the present node if the present node is expanded.  Otherwise, the new node becomes the next sibling of the present node.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">insert-node-before</span></code></dt><dd><p>Inserts a node before the presently selected node.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">delete-node</span></code></dt><dd><p>Deletes a node and all its descendants.</p>
</dd>
</dl>
</section>
<section id="expanding-contracting-nodes">
<h4><a class="toc-backref" href="#id133">Expanding &amp; contracting nodes</a><a class="headerlink" href="#expanding-contracting-nodes" title="Permalink to this heading">¶</a></h4>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">contract-all</span> <span class="pre">(Alt-hyphen)</span></code></dt><dd><p>Contracts every node in the outline.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">contract-all-other-nodes</span></code></dt><dd><p>Contract all nodes except the parents of the selected node.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">contract-node</span></code></dt><dd><p>Contracts a node.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">contract-or-go-left</span> <span class="pre">(Alt-Left)</span></code></dt><dd><p>Contract the node if it is expanded.  Otherwise, select the node’s parent.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">contract-parent</span></code></dt><dd><p>Select the parent of the selected node and contract it.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">expand-all</span></code></dt><dd><p>Expands every node in the outline.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">expand-node</span></code></dt><dd><p>Expands a node.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">expand-and-go-right</span> <span class="pre">(Alt-Right)</span></code></dt><dd><p>Expands a node if not expanded.  Otherwise, selects the first child if there is one.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">expand-all-subheads</span></code></dt><dd><p>Expand all the direct children of the selected node.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">expand-ancestors-only</span></code></dt><dd><p>Expand all the ancestors of the selected node.</p>
</dd>
</dl>
<p>These commands expand all descendants of the selected nodes:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">expand</span><span class="o">-</span><span class="nb">next</span><span class="o">-</span><span class="n">level</span>
<span class="n">expand</span><span class="o">-</span><span class="n">prev</span><span class="o">-</span><span class="n">level</span> <span class="p">(</span><span class="n">reverses</span> <span class="n">expand</span><span class="o">-</span><span class="nb">next</span><span class="o">-</span><span class="n">level</span><span class="p">)</span>
<span class="n">expand</span><span class="o">-</span><span class="n">to</span><span class="o">-</span><span class="n">level</span><span class="o">-</span><span class="mi">1</span>
<span class="n">expand</span><span class="o">-</span><span class="n">to</span><span class="o">-</span><span class="n">level</span><span class="o">-</span><span class="mi">2</span>
<span class="n">expand</span><span class="o">-</span><span class="n">to</span><span class="o">-</span><span class="n">level</span><span class="o">-</span><span class="mi">3</span>
<span class="n">expand</span><span class="o">-</span><span class="n">to</span><span class="o">-</span><span class="n">level</span><span class="o">-</span><span class="mi">4</span>
<span class="n">expand</span><span class="o">-</span><span class="n">to</span><span class="o">-</span><span class="n">level</span><span class="o">-</span><span class="mi">5</span>
<span class="n">expand</span><span class="o">-</span><span class="n">to</span><span class="o">-</span><span class="n">level</span><span class="o">-</span><span class="mi">6</span>
<span class="n">expand</span><span class="o">-</span><span class="n">to</span><span class="o">-</span><span class="n">level</span><span class="o">-</span><span class="mi">7</span>
<span class="n">expand</span><span class="o">-</span><span class="n">to</span><span class="o">-</span><span class="n">level</span><span class="o">-</span><span class="mi">8</span>
<span class="n">expand</span><span class="o">-</span><span class="n">to</span><span class="o">-</span><span class="n">level</span><span class="o">-</span><span class="mi">9</span>
</pre></div>
</div>
</section>
<section id="editing-headlines">
<h4><a class="toc-backref" href="#id134">Editing headlines</a><a class="headerlink" href="#editing-headlines" title="Permalink to this heading">¶</a></h4>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">abort-edit-headline</span></code></dt><dd><p>Ends editing of the headline, discarding any changes.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">edit-headline</span></code></dt><dd><p>Begins editing of the headline of the presently-selected node.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">end-edit-headline</span></code></dt><dd><p>Ends editing of the headline.</p>
</dd>
</dl>
</section>
<section id="selecting-nodes">
<h4><a class="toc-backref" href="#id135">Selecting nodes</a><a class="headerlink" href="#selecting-nodes" title="Permalink to this heading">¶</a></h4>
<p><strong>Arrow keys</strong>: When focus is in the outline pane, you can move about the outline using <em>plain</em> arrow keys. Regardless of focus, Alt-Arrow keys select nodes in the outline pane.</p>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">goto-first-sibling</span></code></dt><dd><p>Select the first sibling of the selected node.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">goto-last-sibling</span></code></dt><dd><p>Select the last sibling of the selected node.</p>
</dd>
</dl>
<p>Similarly, these commands select various nodes in the outline:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">go</span><span class="o">-</span><span class="n">back</span>
<span class="n">go</span><span class="o">-</span><span class="n">forward</span>
<span class="n">goto</span><span class="o">-</span><span class="n">char</span>
<span class="n">goto</span><span class="o">-</span><span class="n">first</span><span class="o">-</span><span class="n">node</span>
<span class="n">goto</span><span class="o">-</span><span class="n">first</span><span class="o">-</span><span class="n">visible</span><span class="o">-</span><span class="n">node</span>
<span class="n">goto</span><span class="o">-</span><span class="n">last</span><span class="o">-</span><span class="n">node</span>
<span class="n">goto</span><span class="o">-</span><span class="n">last</span><span class="o">-</span><span class="n">visible</span><span class="o">-</span><span class="n">node</span>
<span class="n">goto</span><span class="o">-</span><span class="n">line</span>
<span class="n">goto</span><span class="o">-</span><span class="nb">next</span><span class="o">-</span><span class="n">changed</span>
<span class="n">goto</span><span class="o">-</span><span class="nb">next</span><span class="o">-</span><span class="n">clone</span>
<span class="n">goto</span><span class="o">-</span><span class="nb">next</span><span class="o">-</span><span class="n">history</span><span class="o">-</span><span class="n">node</span>
<span class="n">goto</span><span class="o">-</span><span class="nb">next</span><span class="o">-</span><span class="n">node</span>
<span class="n">goto</span><span class="o">-</span><span class="nb">next</span><span class="o">-</span><span class="n">sibling</span>
<span class="n">goto</span><span class="o">-</span><span class="nb">next</span><span class="o">-</span><span class="n">visible</span>
<span class="n">goto</span><span class="o">-</span><span class="n">parent</span>
<span class="n">goto</span><span class="o">-</span><span class="n">prev</span><span class="o">-</span><span class="n">history</span><span class="o">-</span><span class="n">node</span>
<span class="n">goto</span><span class="o">-</span><span class="n">prev</span><span class="o">-</span><span class="n">node</span>
<span class="n">goto</span><span class="o">-</span><span class="n">prev</span><span class="o">-</span><span class="n">sibling</span>
<span class="n">goto</span><span class="o">-</span><span class="n">prev</span><span class="o">-</span><span class="n">visible</span>
</pre></div>
</div>
<dl>
<dt><code class="docutils literal notranslate"><span class="pre">leoscreen-jump-to-error</span></code> (Unix only)</dt><dd><p>Jumps to the python error reported in the shell window, if the
file’s loaded in the current Leo session. Just looks for a line:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">File</span> <span class="s2">&quot;somefile.py&quot;</span><span class="p">,</span> <span class="n">line</span> <span class="n">NNN</span><span class="p">,</span> <span class="ow">in</span> <span class="n">xxx</span>
</pre></div>
</div>
<p>and looks for a node starting with “&#64;” and ending with “somefile.py”,
then jumps to line NNN in that file.</p>
</dd>
</dl>
</section>
<section id="cutting-pasting-deleting-nodes">
<h4><a class="toc-backref" href="#id136">Cutting, pasting &amp; deleting nodes</a><a class="headerlink" href="#cutting-pasting-deleting-nodes" title="Permalink to this heading">¶</a></h4>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">copy-node</span> <span class="pre">(Ctrl-Shift-C)</span></code></dt><dd><p>Copies a node and all its descendants to the clipboard</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">cut-node</span> <span class="pre">(Ctrl-Shift-X)</span></code></dt><dd><p>Copies a node and all its descendants to the clipboard and then delete them.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">delete-node</span></code></dt><dd><p>Deletes a node and all its descendants.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">paste-node</span> <span class="pre">(Ctrl-Shift-V)</span></code></dt><dd><p>Pastes a node and its descendants from the outline. This commands creates <em>copies</em> of nodes, not clones.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">past-retaining-clones</span></code></dt><dd><p>Pastes a node and its descendants from the outline.  This command preserves the identify (gnx’s) of the pasted nodes, thereby preserving any clone links. This command ensures that no newly-pasted node is an ancestor of itself.</p>
</dd>
</dl>
<p><strong>Outline representation</strong>: When cutting or copying an outline to the clipboard, Leo writes the outline in the same xml (text) format used in .leo files. You may copy this text representation into a body pane (or into any other text editor) using <code class="docutils literal notranslate"><span class="pre">Ctrl-V</span></code>.</p>
</section>
<section id="moving-reorganizing-nodes">
<h4><a class="toc-backref" href="#id137">Moving &amp; reorganizing nodes</a><a class="headerlink" href="#moving-reorganizing-nodes" title="Permalink to this heading">¶</a></h4>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">move-outline-down</span> <span class="pre">(Ctrl-D</span> <span class="pre">or</span> <span class="pre">Shift-Down</span> <span class="pre">or</span> <span class="pre">Alt-Shift-Down)</span></code></dt><dd><p>Move the selected node down, if possible.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">move-outline-left</span> <span class="pre">(Ctrl-L</span> <span class="pre">or</span> <span class="pre">Shift-Left</span> <span class="pre">or</span> <span class="pre">Alt-Shift-Left)</span></code></dt><dd><p>Move the selected node left, if possible.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">move-outline-right</span> <span class="pre">(Ctrl-R</span> <span class="pre">or</span> <span class="pre">Shift-Right</span> <span class="pre">or</span> <span class="pre">Alt-Shift-Right)</span></code></dt><dd><p>Move the selected node right, if possible.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">move-outline-up</span> <span class="pre">(Ctrl-U</span> <span class="pre">or</span> <span class="pre">Shift-Up</span> <span class="pre">Alt-Shift-Up)</span></code></dt><dd><p>Move the selected node up, if possible.</p>
</dd>
</dl>
<p><strong>Alt Modifiers not needed in the outline pane</strong>: When focus is in the outline pane, you can move nodes without adding the Alt modifier. Shift-Up moves the select node up, etc.</p>
<p><strong>Important</strong>: The following commands reorganize groups of nodes:</p>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">de-hoist</span></code></dt><dd><p>Undoes the effect of the previous <code class="docutils literal notranslate"><span class="pre">hoist</span></code> command.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">demote</span> <span class="pre">(Ctrl-])</span></code></dt><dd><p>Makes all following siblings of a node children of the node.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">hoist</span></code></dt><dd><p>Redraws the screen so presently selected tree becomes the only visible part of the outline. You may hoist an outline as many times as you wish.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">promote</span> <span class="pre">(Ctrl-[)</span></code></dt><dd><p>Makes all the children of a node siblings of the node.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">sort-children</span></code></dt><dd><p>Sort all children of the children of the present node by their headlines.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">sort-siblings</span> <span class="pre">(Alt-A)</span></code></dt><dd><p>Sort the present node and all its siblings by their headlines.</p>
</dd>
</dl>
</section>
<section id="converting-between-outlines-and-text">
<h4><a class="toc-backref" href="#id138">Converting between outlines and text</a><a class="headerlink" href="#converting-between-outlines-and-text" title="Permalink to this heading">¶</a></h4>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">code-to-rst</span></code></dt><dd><p>Format the presently selected node as computer code.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">flatten-outline-to-node</span></code></dt><dd><p>Appends the headline and body text of all descendants of the selected node to the body text of the selected node.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">parse-body</span></code></dt><dd><p>Parse p.b as source code, creating a tree of descendant nodes.
This is essentially an import of p.b.</p>
</dd>
</dl>
</section>
<section id="dragging-nodes">
<h4><a class="toc-backref" href="#id139">Dragging nodes</a><a class="headerlink" href="#dragging-nodes" title="Permalink to this heading">¶</a></h4>
<p>You may drag a node (including all its descendants) from one place to another in an outline. To start a drag, press the main (left) mouse button while the cursor is over the icon for a node. The cursor will change to a hand icon. If you release the mouse button while the hand cursor is above another node, Leo will move the dragged node after that node. If you release the mouse button when the hand cursor is not over a node, Leo will leave the outline pane as it is. Leo scrolls the outline pane as the result of mouse-moved events, so to continue scrolling you must keep moving the mouse.</p>
<p>If the recipient node has children and is expanded, the dropped node will be inserted as the first child of the recipient node, otherwise the dropped node will be inserted after the recipient node.</p>
<p>Holding down Alt before releasing the node will force insertion as a child of the recipient node, even if the recipient node is not expanded. Holding down Control before releasing the node will cause a clone to be dropped, leaving the original where it was.</p>
</section>
<section id="marking-nodes">
<h4><a class="toc-backref" href="#id140">Marking nodes</a><a class="headerlink" href="#marking-nodes" title="Permalink to this heading">¶</a></h4>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">copy-marked</span></code></dt><dd><p>Copies all marked nodes as children of a new node.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">diff-marked-nodes</span></code></dt><dd><p>When exactly two nodes are marked, this command creates a diff node as the last top-level node whose children are clones of the marked nodes.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">goto-next-marked</span></code></dt><dd><p>Selects the next marked node.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">mark</span> <span class="pre">(Ctrl-M)</span></code></dt><dd><p>Marks node if it is unmarked, and unmarks the node if it is already marked.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">mark-changed-items</span></code></dt><dd><p>Marks all nodes whose headline or body text has been changed since the file was last saved.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">mark-subheads</span></code></dt><dd><p>Marks all children of the presently selected node.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">marked-list</span></code></dt><dd><p>Lists all marked nodes in the Nav pane.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">unmark-all</span></code></dt><dd><p>Unmarks all marked nodes in the outline.</p>
</dd>
</dl>
<p><strong>Marking groups of nodes</strong>: Leo’s find and change commands mark nodes if the “Mark Changes” and “Mark Finds” checkboxes are checked. You can change these checkboxes with the <code class="docutils literal notranslate"><span class="pre">toggle-find-mark-changes-option</span></code> and <code class="docutils literal notranslate"><span class="pre">toggle-find-mark-finds-option</span></code> commands.</p>
</section>
<section id="operations-on-marked-nodes">
<h4><a class="toc-backref" href="#id141">Operations on marked nodes</a><a class="headerlink" href="#operations-on-marked-nodes" title="Permalink to this heading">¶</a></h4>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">clone-marked-nodes</span></code></dt><dd><p>Makes clones of all marked nodes and moves them to be children of the present position.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">delete-marked-nodes</span></code></dt><dd><p>Deletes all marked nodes.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">move-marked-nodes</span></code></dt><dd><p>Moves all nodes to be children of the present position.</p>
</dd>
</dl>
</section>
<section id="comparing-outlines">
<h4><a class="toc-backref" href="#id142">Comparing outlines</a><a class="headerlink" href="#comparing-outlines" title="Permalink to this heading">¶</a></h4>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">file-compare-leo-files</span></code></dt><dd><p>Prompts for another (presumably similar) .leo file that will be compared with the presently selected outline file (main window). It then creates clones of all inserted, deleted and changed nodes.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">file-diff-files</span></code></dt><dd><p>Creates a node and puts the diff between 2 files into it.</p>
</dd>
</dl>
</section>
<section id="using-chapters">
<h4><a class="toc-backref" href="#id143">Using Chapters</a><a class="headerlink" href="#using-chapters" title="Permalink to this heading">¶</a></h4>
<p>&#64;chapter trees define chapters. Selecting a chapter makes only those nodes in the chapter visible, much like a hoist. The <code class="docutils literal notranslate"><span class="pre">main</span></code> chapter represents the entire outline. Selecting the <code class="docutils literal notranslate"><span class="pre">main</span></code> chapter shows all outline nodes.</p>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">chapter-select-main</span></code></dt><dd><p>Selects the main chapter.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">chapter-select-&lt;chapter-name&gt;</span></code></dt><dd><p>Each &#64;chapter node in the outline creates a corresponding chapter-select command.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">chapter-next</span></code></dt><dd><p>Selects the next chapter.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">chapter-back</span></code></dt><dd><p>Selects the previous chapter.</p>
</dd>
</dl>
<p>Associated settings:</p>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">&#64;bool</span> <span class="pre">use_chapters</span></code></dt><dd><p>True: chapters are enabled.</p>
</dd>
</dl>
</section>
</section>
<section id="plugins-commands">
<h3><a class="toc-backref" href="#id85">Plugins commands</a><a class="headerlink" href="#plugins-commands" title="Permalink to this heading">¶</a></h3>
<dl>
<dt><code class="docutils literal notranslate"><span class="pre">act-on-node</span></code></dt><dd><p>Executes node-specific action, typically defined in a plugins as follows:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">leo.core.leoPlugins</span>

<span class="k">def</span> <span class="nf">act_print_upcase</span><span class="p">(</span><span class="n">c</span><span class="p">,</span><span class="n">p</span><span class="p">,</span><span class="n">event</span><span class="p">):</span>
    <span class="k">if</span> <span class="ow">not</span> <span class="n">p</span><span class="o">.</span><span class="n">h</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s1">&#39;@up&#39;</span><span class="p">):</span>
        <span class="k">raise</span> <span class="n">leo</span><span class="o">.</span><span class="n">core</span><span class="o">.</span><span class="n">leoPlugins</span><span class="o">.</span><span class="n">TryNext</span>
    <span class="n">p</span><span class="o">.</span><span class="n">h</span> <span class="o">=</span> <span class="n">p</span><span class="o">.</span><span class="n">h</span><span class="o">.</span><span class="n">upper</span><span class="p">()</span>

<span class="n">g</span><span class="o">.</span><span class="n">act_on_node</span><span class="o">.</span><span class="n">add</span><span class="p">(</span><span class="n">act_print_upcase</span><span class="p">)</span>
</pre></div>
</div>
<p>This will upcase the headline when it starts with &#64;up.</p>
</dd>
</dl>
<p>Plugins create the following commands:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1"># bookmarks.py</span>
<span class="n">bookmarks</span><span class="o">-</span><span class="n">bookmark</span>
<span class="n">bookmarks</span><span class="o">-</span><span class="n">bookmark</span><span class="o">-</span><span class="n">child</span>
<span class="n">bookmarks</span><span class="o">-</span><span class="n">level</span><span class="o">-</span><span class="n">decrease</span>
<span class="n">bookmarks</span><span class="o">-</span><span class="n">level</span><span class="o">-</span><span class="n">increase</span>
<span class="n">bookmarks</span><span class="o">-</span><span class="n">mark</span><span class="o">-</span><span class="k">as</span><span class="o">-</span><span class="n">target</span>
<span class="n">bookmarks</span><span class="o">-</span><span class="nb">open</span><span class="o">-</span><span class="n">bookmark</span>
<span class="n">bookmarks</span><span class="o">-</span><span class="nb">open</span><span class="o">-</span><span class="n">node</span>
<span class="n">bookmarks</span><span class="o">-</span><span class="n">show</span>
<span class="n">bookmarks</span><span class="o">-</span><span class="n">switch</span>
<span class="n">bookmarks</span><span class="o">-</span><span class="n">use</span><span class="o">-</span><span class="n">other</span><span class="o">-</span><span class="n">outline</span>

<span class="c1"># printing.py</span>
<span class="n">preview</span>
<span class="n">preview</span><span class="o">-</span><span class="n">node</span>
<span class="n">preview</span><span class="o">-</span><span class="n">tree</span>
<span class="nb">print</span><span class="o">-</span><span class="n">expanded</span><span class="o">-</span><span class="n">node</span>
<span class="nb">print</span><span class="o">-</span><span class="n">expanded</span><span class="o">-</span><span class="n">node</span><span class="o">-</span><span class="n">body</span>
<span class="nb">print</span><span class="o">-</span><span class="n">marked</span><span class="o">-</span><span class="n">node</span><span class="o">-</span><span class="n">bodies</span>
<span class="nb">print</span><span class="o">-</span><span class="n">marked</span><span class="o">-</span><span class="n">nodes</span>
<span class="nb">print</span><span class="o">-</span><span class="n">preview</span><span class="o">-</span><span class="n">expanded</span><span class="o">-</span><span class="n">node</span>
<span class="nb">print</span><span class="o">-</span><span class="n">preview</span><span class="o">-</span><span class="n">expanded</span><span class="o">-</span><span class="n">node</span><span class="o">-</span><span class="n">body</span>
<span class="nb">print</span><span class="o">-</span><span class="n">preview</span><span class="o">-</span><span class="n">marked</span><span class="o">-</span><span class="n">node</span><span class="o">-</span><span class="n">bodies</span>
<span class="nb">print</span><span class="o">-</span><span class="n">preview</span><span class="o">-</span><span class="n">marked</span><span class="o">-</span><span class="n">nodes</span>
<span class="nb">print</span><span class="o">-</span><span class="n">preview</span><span class="o">-</span><span class="n">selected</span><span class="o">-</span><span class="n">node</span>
<span class="nb">print</span><span class="o">-</span><span class="n">preview</span><span class="o">-</span><span class="n">selected</span><span class="o">-</span><span class="n">node</span><span class="o">-</span><span class="n">body</span>
<span class="nb">print</span><span class="o">-</span><span class="n">preview</span><span class="o">-</span><span class="n">selected</span><span class="o">-</span><span class="n">node</span><span class="o">-</span><span class="n">body</span><span class="o">-</span><span class="n">html</span>
<span class="nb">print</span><span class="o">-</span><span class="n">selected</span><span class="o">-</span><span class="n">node</span>
<span class="nb">print</span><span class="o">-</span><span class="n">selected</span><span class="o">-</span><span class="n">node</span><span class="o">-</span><span class="n">body</span>
<span class="nb">print</span><span class="o">-</span><span class="n">selected</span><span class="o">-</span><span class="n">node</span><span class="o">-</span><span class="n">body</span><span class="o">-</span><span class="n">html</span>

<span class="c1"># quicksearch.py</span>
<span class="n">find</span><span class="o">-</span><span class="n">quick</span>
<span class="n">find</span><span class="o">-</span><span class="n">quick</span><span class="o">-</span><span class="n">changed</span>
<span class="n">find</span><span class="o">-</span><span class="n">quick</span><span class="o">-</span><span class="n">selected</span>
<span class="n">find</span><span class="o">-</span><span class="n">quick</span><span class="o">-</span><span class="n">test</span><span class="o">-</span><span class="n">failures</span>
<span class="n">find</span><span class="o">-</span><span class="n">quick</span><span class="o">-</span><span class="n">timeline</span>
<span class="n">focus</span><span class="o">-</span><span class="n">to</span><span class="o">-</span><span class="n">nav</span>
<span class="n">go</span><span class="o">-</span><span class="n">anywhere</span>
<span class="n">history</span>
<span class="n">marked</span><span class="o">-</span><span class="nb">list</span>

<span class="c1"># richtext.py</span>
<span class="n">cke</span><span class="o">-</span><span class="n">text</span><span class="o">-</span><span class="n">close</span>
<span class="n">cke</span><span class="o">-</span><span class="n">text</span><span class="o">-</span><span class="nb">open</span>
<span class="n">cke</span><span class="o">-</span><span class="n">text</span><span class="o">-</span><span class="n">switch</span>
<span class="n">cke</span><span class="o">-</span><span class="n">text</span><span class="o">-</span><span class="n">toggle</span><span class="o">-</span><span class="n">autosave</span>
<span class="n">richtext</span><span class="o">-</span><span class="n">close</span><span class="o">-</span><span class="n">editor</span>
<span class="n">richtext</span><span class="o">-</span><span class="nb">open</span><span class="o">-</span><span class="n">editor</span>
<span class="n">richtext</span><span class="o">-</span><span class="n">switch</span><span class="o">-</span><span class="n">editor</span>
<span class="n">richtext</span><span class="o">-</span><span class="n">toggle</span><span class="o">-</span><span class="n">autosave</span>

<span class="c1"># viewrendered.py</span>
<span class="n">vr</span><span class="o">-</span><span class="n">contract</span>
<span class="n">vr</span><span class="o">-</span><span class="n">expand</span>
<span class="n">vr</span><span class="o">-</span><span class="n">hide</span>
<span class="n">vr</span><span class="o">-</span><span class="n">lock</span>
<span class="n">vr</span><span class="o">-</span><span class="n">pause</span><span class="o">-</span><span class="n">play</span><span class="o">-</span><span class="n">movie</span>
<span class="n">vr</span><span class="o">-</span><span class="n">show</span>
<span class="n">vr</span><span class="o">-</span><span class="n">toggle</span> <span class="p">(</span><span class="n">Alt</span><span class="o">-</span><span class="mi">0</span><span class="p">)</span>
<span class="n">vr</span><span class="o">-</span><span class="n">unlock</span>
<span class="n">vr</span><span class="o">-</span><span class="n">update</span>
</pre></div>
</div>
</section>
<section id="search-spell-commands">
<h3><a class="toc-backref" href="#id86">Search &amp; spell commands</a><a class="headerlink" href="#search-spell-commands" title="Permalink to this heading">¶</a></h3>
<div class="contents local topic" id="id11">
<p class="topic-title">Contents</p>
<ul class="simple">
<li><p><a class="reference internal" href="#basic-searches" id="id144">Basic searches</a></p></li>
<li><p><a class="reference internal" href="#incremental-find-commands" id="id145">Incremental find commands</a></p></li>
<li><p><a class="reference internal" href="#word-search-and-regex-search-commands" id="id146">Word search and regex search commands</a></p></li>
<li><p><a class="reference internal" href="#check-boxes-and-their-commands" id="id147">Check boxes and their commands</a></p></li>
<li><p><a class="reference internal" href="#radio-buttons-and-their-commands" id="id148">Radio buttons and their commands</a></p></li>
<li><p><a class="reference internal" href="#spell-commands" id="id149">Spell commands</a></p></li>
</ul>
</div>
<section id="basic-searches">
<h4><a class="toc-backref" href="#id144">Basic searches</a><a class="headerlink" href="#basic-searches" title="Permalink to this heading">¶</a></h4>
<p>Basic searches:</p>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">start-search</span> <span class="pre">(Ctrl-F)</span></code></dt><dd><p>Prompts for a search string. Typing the <code class="docutils literal notranslate"><span class="pre">Return</span></code> key puts the search string in the Find tab and executes a search based on all the settings in the Find tab. Type <code class="docutils literal notranslate"><span class="pre">Tab</span></code> to enter replacement text.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">find-next</span> <span class="pre">(F3)</span></code></dt><dd><p>Continues a search started with <code class="docutils literal notranslate"><span class="pre">Ctrl-F</span></code>.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">find-previous</span> <span class="pre">(F2)</span></code></dt><dd><p>Searches backwards using the present search options.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">replace</span> <span class="pre">(Ctrl-=)</span></code></dt><dd><p>Replaces the selected text with the ‘change’ text in the Find tab.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">replace-then-find</span> <span class="pre">(Ctrl--)</span></code></dt><dd><p>Replaces the selected text with the ‘change’ text in the Find tab, then executes the find command again.</p>
</dd>
</dl>
<p>Batch searches:</p>
<dl>
<dt><code class="docutils literal notranslate"><span class="pre">find-all</span></code></dt><dd><p>Prints all matches in the log pane.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">replace-all</span></code></dt><dd><p>Changes all occurrences of the ‘find’ text with the ‘change’ text.
When using the minibuffer to specify search and replace patterns,
first enter then search pattern,
then type <code class="docutils literal notranslate"><span class="pre">Tab</span></code> and enter the replacement pattern:</p>
<p>&lt;Alt-x&gt;replace-all&lt;return&gt;find-pattern&lt;tab&gt;replacement-pattern&lt;return&gt;</p>
</dd>
</dl>
<p>Searches creating clones:</p>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">clone-find-all-flattened</span></code> aka <code class="docutils literal notranslate"><span class="pre">(cfaf)</span></code></dt><dd><p>Prompts for a find, then creates clones of all found nodes in an organizer node.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">clone-find-all</span></code> aka <code class="docutils literal notranslate"><span class="pre">(cfa)</span></code></dt><dd><p>Same as <code class="docutils literal notranslate"><span class="pre">clone-find-all-flattened</span></code>, but does not create duplicate cloned nodes. If a node is a descendant of another found node, no duplicate top-level node (in the organizer) is created.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">clone-find-marked</span></code> aka <code class="docutils literal notranslate"><span class="pre">(cfm)</span></code> and <code class="docutils literal notranslate"><span class="pre">clone-find-marked-flattened</span></code> aka <code class="docutils literal notranslate"><span class="pre">(cfmf)</span></code></dt><dd><p>Creates clones of all marked nodes.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">clone-find-parents</span></code></dt><dd><p>Creates an organizer node containing clones of all the parents of the selected node.</p>
</dd>
</dl>
</section>
<section id="incremental-find-commands">
<h4><a class="toc-backref" href="#id145">Incremental find commands</a><a class="headerlink" href="#incremental-find-commands" title="Permalink to this heading">¶</a></h4>
<p>Incremental find commands move through the text as you type individual characters. Typing <code class="docutils literal notranslate"><span class="pre">BackSpace</span></code> backtracks the search. To repeat an incremental search, type the shortcut for that command again. Here are Leo’s incremental find commands:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Alt</span><span class="o">+</span><span class="n">R</span> <span class="n">isearch</span><span class="o">-</span><span class="n">backward</span>
      <span class="n">isearch</span><span class="o">-</span><span class="n">backward</span><span class="o">-</span><span class="n">regexp</span>
<span class="n">Alt</span><span class="o">+</span><span class="n">I</span> <span class="n">isearch</span><span class="o">-</span><span class="n">forward</span>
      <span class="n">isearch</span><span class="o">-</span><span class="n">forward</span><span class="o">-</span><span class="n">regexp</span>
      <span class="n">isearch</span><span class="o">-</span><span class="k">with</span><span class="o">-</span><span class="n">present</span><span class="o">-</span><span class="n">options</span>
</pre></div>
</div>
</section>
<section id="word-search-and-regex-search-commands">
<h4><a class="toc-backref" href="#id146">Word search and regex search commands</a><a class="headerlink" href="#word-search-and-regex-search-commands" title="Permalink to this heading">¶</a></h4>
<p>The following commands work like <code class="docutils literal notranslate"><span class="pre">F3</span> <span class="pre">(start-search)</span></code> with various options set:</p>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">search-backward</span></code></dt><dd><p>Searches in the reverse direction.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">word-search-backward</span></code> and <code class="docutils literal notranslate"><span class="pre">word-search-forward</span></code></dt><dd><p>Sets ‘Whole Word’ checkbox to True.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">re-search-forward</span></code> and <code class="docutils literal notranslate"><span class="pre">re-search-backward</span></code></dt><dd><p>Set the ‘Regexp’ checkbox to True.</p>
</dd>
</dl>
</section>
<section id="check-boxes-and-their-commands">
<h4><a class="toc-backref" href="#id147">Check boxes and their commands</a><a class="headerlink" href="#check-boxes-and-their-commands" title="Permalink to this heading">¶</a></h4>
<p>The following check boxes options appear in the Find pane:</p>
<dl>
<dt><code class="docutils literal notranslate"><span class="pre">Ignore</span> <span class="pre">Case</span></code></dt><dd><p>When checked, the Find and Change commands ignore the case of alphabetic characters when determining matches.</p>
<p><code class="docutils literal notranslate"><span class="pre">Alt+Ctrl+I</span> <span class="pre">(toggle-find-ignore-case-option)</span></code> toggles this checkbox.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">Mark</span> <span class="pre">Changes</span></code></dt><dd><p>When checked, the Change command marks all headlines whose headline or body text are changed by the command.</p>
<p><code class="docutils literal notranslate"><span class="pre">Alt+Ctrl+C</span> <span class="pre">(toggle-find-mark-changes-option)</span></code> toggles this checkbox.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">Mark</span> <span class="pre">Matches</span></code></dt><dd><p>When checked, the Find and Change commands mark all headlines in which a match is found with the pattern.</p>
<p><code class="docutils literal notranslate"><span class="pre">Alt+Ctrl+F</span> <span class="pre">(toggle-find-mark-finds-option)</span></code> toggles this checkbox.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">Pattern</span> <span class="pre">Match</span></code></dt><dd><p>When checked, the Find and Change commands treat several characters specially in the find pattern.</p>
<p><code class="docutils literal notranslate"><span class="pre">Alt+Ctrl+X</span> <span class="pre">(toggle-find-regex-option)</span></code> toggles this checkbox.</p>
</dd>
</dl>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="s1">&#39;*&#39;</span>  <span class="n">matches</span> <span class="nb">any</span> <span class="n">sequence</span> <span class="n">of</span> <span class="n">zero</span> <span class="ow">or</span> <span class="n">more</span> <span class="n">characters</span><span class="o">.</span>
<span class="s1">&#39;.&#39;</span>  <span class="n">matches</span> <span class="nb">any</span> <span class="n">single</span> <span class="n">character</span><span class="o">.</span>
<span class="s1">&#39;^&#39;</span>  <span class="n">matches</span> <span class="n">a</span> <span class="n">newline</span> <span class="n">at</span> <span class="n">the</span> <span class="n">start</span> <span class="n">of</span> <span class="n">a</span> <span class="n">pattern</span><span class="o">.</span>
<span class="s1">&#39;$&#39;</span>  <span class="n">matches</span> <span class="n">a</span> <span class="n">newline</span> <span class="n">at</span> <span class="n">the</span> <span class="n">end</span> <span class="n">of</span> <span class="n">a</span> <span class="n">pattern</span><span class="o">.</span>

<span class="n">Examples</span><span class="p">::</span>

<span class="s2">&quot;^abc$&quot;</span> <span class="n">matches</span> <span class="n">lines</span> <span class="n">that</span> <span class="n">only</span> <span class="n">contain</span> <span class="s2">&quot;abc&quot;</span><span class="o">.</span>
<span class="s2">&quot;^a&quot;</span> <span class="n">matches</span> <span class="nb">any</span> <span class="n">line</span> <span class="n">starting</span> <span class="k">with</span> <span class="s2">&quot;A&quot;</span><span class="o">.</span>
<span class="s2">&quot;a$&quot;</span> <span class="n">matches</span> <span class="nb">any</span> <span class="n">line</span> <span class="n">ending</span> <span class="k">with</span> <span class="s2">&quot;a&quot;</span><span class="o">.</span>
<span class="s2">&quot;^*$&quot;</span> <span class="n">matches</span> <span class="nb">any</span> <span class="n">line</span> <span class="n">at</span> <span class="nb">all</span><span class="o">.</span>
</pre></div>
</div>
<dl>
<dt><code class="docutils literal notranslate"><span class="pre">Search</span> <span class="pre">Body</span> <span class="pre">Text</span></code></dt><dd><p>When checked, the Find and Change commands search body text.</p>
<p><code class="docutils literal notranslate"><span class="pre">Alt+Ctrl+B</span> <span class="pre">(toggle-find-in-body-option)</span></code> toggles this checkbox.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">Search</span> <span class="pre">Headline</span> <span class="pre">Text</span></code></dt><dd><p>When checked, the Find and Change commands search headline text.</p>
<p><code class="docutils literal notranslate"><span class="pre">Alt+Ctrl+H</span> <span class="pre">(toggle-find-in-headline-option)</span></code> toggles this checkbox.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">Whole</span> <span class="pre">Word</span></code></dt><dd><p>When selected, the find pattern must match an entire word. Words consist of an alphabetic character or underscore, followed by zero or more alphabetic characters, numbers or underscores.</p>
<p><code class="docutils literal notranslate"><span class="pre">Alt+Ctrl+W</span> <span class="pre">(toggle-find-word-option)</span></code> toggles this checkbox.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">Wrap</span> <span class="pre">Around</span></code></dt><dd><p>When checked, the Find and Change commands continues at the top of the file when the command reaches the bottom of the file. For reverse searches, the find or change command continues at the bottom of the file when the command reaches the top of the file.</p>
<p><code class="docutils literal notranslate"><span class="pre">Alt+Ctrl+A</span> <span class="pre">(toggle-find-wrap-around-option)</span></code> toggles this checkbox.</p>
</dd>
</dl>
</section>
<section id="radio-buttons-and-their-commands">
<h4><a class="toc-backref" href="#id148">Radio buttons and their commands</a><a class="headerlink" href="#radio-buttons-and-their-commands" title="Permalink to this heading">¶</a></h4>
<p>The following radio buttons appear in the Find pane:</p>
<dl>
<dt><code class="docutils literal notranslate"><span class="pre">Entire</span> <span class="pre">Outline</span></code></dt><dd><p>When selected, Find commands search the entire outline.</p>
<p><code class="docutils literal notranslate"><span class="pre">Alt+Ctrl+E</span> <span class="pre">(set-find-everywhere)</span></code> sets this radio button.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">Node</span> <span class="pre">Only</span></code></dt><dd><p>When selected, Find commands search only the selected node.</p>
<p><code class="docutils literal notranslate"><span class="pre">Alt+Ctrl+N</span> <span class="pre">(set-find-node-only)</span></code> sets this radio button</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">Suboutline</span> <span class="pre">Only</span></code></dt><dd><p>When selected, the Find and Change commands search only the currently
selected headline and its offspring.</p>
<p><code class="docutils literal notranslate"><span class="pre">Alt+Ctrl+S</span> <span class="pre">(set-find-suboutline-only)</span></code> sets this radio button.</p>
</dd>
</dl>
</section>
<section id="spell-commands">
<h4><a class="toc-backref" href="#id149">Spell commands</a><a class="headerlink" href="#spell-commands" title="Permalink to this heading">¶</a></h4>
<p>The following commands refer to spell-as-you-type mode:</p>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">spell-as-you-type-next</span></code></dt><dd><p>Cycle the word behind (left of, for ltr languages) the cursor through the full list of suggestions.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">spell-as-you-type-toggle</span></code></dt><dd><p>Toggle spell as you type mode.  When enabled, word ending keystrokes will put a short list of suggestions in the log window, if the word is unknown to the speller.  Only shows the first 5 suggestions, even if there are more.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">spell-as-you-type-undo</span></code></dt><dd><p>Undo the last spelling correction.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">spell-as-you-type-wrap</span></code></dt><dd><p>Toggle wrapping in spell-as-you-type mode.</p>
</dd>
</dl>
<p>The following commands refer to the Spell Tab:</p>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">focus-to-spell-tab</span></code></dt><dd><p>Put focus in the Spell tab.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">spell-change</span></code></dt><dd><p>Same as clicking the “Change” button in the Spell Tab.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">spell-change-then-find</span></code></dt><dd><p>Same as clicking the “Change, Find” button in the Spell Tab.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">spell-find</span></code></dt><dd><p>Same as clicking the “Find” button in the Spell Tab.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">spell-ignore</span></code></dt><dd><p>Same as clicking the “Ignore” button in the Spell Tab.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">spell-tab-hide</span></code></dt><dd><p>Hide the Spell tab.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">spell-tab-open</span></code></dt><dd><p>Show the Spell tab.</p>
</dd>
</dl>
</section>
</section>
<section id="settings-commands">
<h3><a class="toc-backref" href="#id93">Settings commands</a><a class="headerlink" href="#settings-commands" title="Permalink to this heading">¶</a></h3>
<dl>
<dt><code class="docutils literal notranslate"><span class="pre">open-local-settings</span></code></dt><dd><p>Select the &#64;settings node in the present file, if any.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">open-myLeoSettings-leo</span></code></dt><dd><p>Open myLeoSettings.leo in a new window.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">style-reload</span></code></dt><dd><p>Reloads all visual setting, but not themes.</p>
<p><strong>Example</strong>: Change the <code class="docutils literal notranslate"><span class="pre">&#64;string</span> <span class="pre">font-size</span></code> setting, then do <code class="docutils literal notranslate"><span class="pre">style-reload</span></code> and see what happens.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">style-set-selected</span></code></dt><dd><p>Set the global stylesheet to c.p.b.</p>
</dd>
</dl>
<p>The following commands enable, disable or toggle various settings:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">clear</span><span class="o">-</span><span class="n">extend</span><span class="o">-</span><span class="n">mode</span>
<span class="n">disable</span><span class="o">-</span><span class="n">autocompleter</span>
<span class="n">disable</span><span class="o">-</span><span class="n">calltips</span>
<span class="n">enable</span><span class="o">-</span><span class="n">autocompleter</span>
<span class="n">enable</span><span class="o">-</span><span class="n">calltips</span>
<span class="nb">set</span><span class="o">-</span><span class="n">colors</span>
<span class="nb">set</span><span class="o">-</span><span class="n">command</span><span class="o">-</span><span class="n">state</span>
<span class="nb">set</span><span class="o">-</span><span class="n">extend</span><span class="o">-</span><span class="n">mode</span>
<span class="nb">set</span><span class="o">-</span><span class="n">insert</span><span class="o">-</span><span class="n">state</span>
<span class="nb">set</span><span class="o">-</span><span class="n">overwrite</span><span class="o">-</span><span class="n">state</span>
<span class="nb">set</span><span class="o">-</span><span class="n">replace</span><span class="o">-</span><span class="n">string</span>
<span class="nb">set</span><span class="o">-</span><span class="n">search</span><span class="o">-</span><span class="n">string</span>
<span class="nb">set</span><span class="o">-</span><span class="n">silent</span><span class="o">-</span><span class="n">mode</span>
<span class="n">toggle</span><span class="o">-</span><span class="n">abbrev</span><span class="o">-</span><span class="n">mode</span>
<span class="n">toggle</span><span class="o">-</span><span class="n">autocompleter</span>
<span class="n">toggle</span><span class="o">-</span><span class="n">calltips</span>
<span class="n">toggle</span><span class="o">-</span><span class="n">case</span><span class="o">-</span><span class="n">region</span>
<span class="n">toggle</span><span class="o">-</span><span class="n">extend</span><span class="o">-</span><span class="n">mode</span>
<span class="n">toggle</span><span class="o">-</span><span class="n">find</span><span class="o">-</span><span class="n">collapses</span><span class="o">-</span><span class="n">nodes</span>
<span class="n">toggle</span><span class="o">-</span><span class="nb">input</span><span class="o">-</span><span class="n">state</span>
<span class="n">toggle</span><span class="o">-</span><span class="n">invisibles</span>
<span class="n">toggle</span><span class="o">-</span><span class="n">sparse</span><span class="o">-</span><span class="n">move</span>
<span class="n">toggle</span><span class="o">-</span><span class="n">split</span><span class="o">-</span><span class="n">direction</span>
</pre></div>
</div>
</section>
<section id="code-beautification-commands">
<h3><a class="toc-backref" href="#id94">Code beautification commands</a><a class="headerlink" href="#code-beautification-commands" title="Permalink to this heading">¶</a></h3>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">beautify-node</span></code></dt><dd><p>Beautifies the Python code in the selected node.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">beautify-tree</span></code></dt><dd><p>Beautifies all the Python code in the selected tree.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">beautify-c</span></code></dt><dd><p>Reformats all C code in the selected tree.</p>
</dd>
</dl>
<p>These commands skip any nodes for which &#64;language python (or c) is not in effect.</p>
<p>The <strong>Python beautifier</strong> (beautify-tree and beautify-node) is <a class="reference external" href="https://peps.python.org/pep-0008/">PEP8</a> compliant. The beautifier will <em>just work</em> for most people.</p>
<p>The Python beautifier works only on syntactically correct code. It issues a warning and does nothing for syntactically incorrect code.</p>
<section id="comparison-with-black">
<h4><a class="toc-backref" href="#id95">Comparison with Black</a><a class="headerlink" href="#comparison-with-black" title="Permalink to this heading">¶</a></h4>
<p>Leo’s beautify command differs from <a class="reference external" href="https://github.com/psf/black">Black</a> as follows:</p>
<ul class="simple">
<li><p>beautify never changes Leo’s sentinel comments.</p></li>
<li><p>beautify never splits or joints lines (with the default settings).
Black sometimes inserts horrible line breaks.</p></li>
<li><p>beautify never converts single-quote strings to double-quote strings.
That is, beautify simulates Black’s –skip-string-normalization command-line option.</p></li>
<li><p>beautify doesn’t insert extra blank lines at the end of nodes.
Technically, this is a pep8 violation, but these extra lines are not Leonine.</p></li>
</ul>
</section>
<section id="beautifier-directives">
<h4><a class="toc-backref" href="#id96">Beautifier directives</a><a class="headerlink" href="#beautifier-directives" title="Permalink to this heading">¶</a></h4>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">&#64;killbeautify</span></code></dt><dd><p>This directive completely disables beautification for an entire tree. This is typically required for files containing <code class="docutils literal notranslate"><span class="pre">&#64;all</span></code>.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">&#64;beautify</span></code> and <code class="docutils literal notranslate"><span class="pre">&#64;nobeautify</span></code></dt><dd><p>These directives apply to a node and its descendants, until overridden later in a descendants. Both these directives may appear in the same node.  Such <strong>ambiguous directives</strong> do not affect the beautification of descendant nodes.  If both <code class="docutils literal notranslate"><span class="pre">&#64;beautify</span></code> and <code class="docutils literal notranslate"><span class="pre">&#64;nobeautify</span></code> appear in a node, the first directive determines whether the node will be beautified.</p>
</dd>
</dl>
<p>For example:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="nd">@beautify</span>
<span class="o">...</span>
<span class="nd">@nobeautify</span>
</pre></div>
</div>
<p>beautifies the entire node.  Otoh:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="nd">@nobeautify</span>
<span class="o">...</span>
<span class="nd">@beautify</span>
</pre></div>
</div>
<p>skips beautification of the entire node. Yes, this is less precise than one could imagine, but it’s good enough for now.</p>
</section>
<section id="stand-alone-beautifier">
<h4><a class="toc-backref" href="#id97">Stand-alone beautifier</a><a class="headerlink" href="#stand-alone-beautifier" title="Permalink to this heading">¶</a></h4>
<p>You can run leoBeautify.py from the command line:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">python</span> <span class="o">-</span><span class="n">m</span> <span class="n">leo</span><span class="o">.</span><span class="n">core</span><span class="o">.</span><span class="n">leoAst</span> <span class="o">--</span><span class="n">orange</span> <span class="n">file1</span><span class="p">,</span> <span class="n">file2</span><span class="o">...</span>
</pre></div>
</div>
<p>Running:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">python</span> <span class="o">-</span><span class="n">m</span> <span class="n">leo</span><span class="o">.</span><span class="n">core</span><span class="o">.</span><span class="n">leoAst</span> <span class="o">-</span><span class="n">h</span>
</pre></div>
</div>
<p>Produces something like this:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">usage</span><span class="p">:</span> <span class="n">leoAst</span><span class="o">.</span><span class="n">py</span> <span class="p">[</span><span class="o">-</span><span class="n">h</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">fstringify</span> <span class="o">|</span> <span class="o">--</span><span class="n">fstringify</span><span class="o">-</span><span class="n">diff</span> <span class="o">|</span> <span class="o">--</span><span class="n">orange</span> <span class="o">|</span> <span class="o">--</span><span class="n">orange</span><span class="o">-</span><span class="n">diff</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">allow</span><span class="o">-</span><span class="n">joined</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="nb">max</span><span class="o">-</span><span class="n">join</span> <span class="n">N</span><span class="p">]</span>
                 <span class="p">[</span><span class="o">--</span><span class="nb">max</span><span class="o">-</span><span class="n">split</span> <span class="n">N</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">recursive</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">tab</span><span class="o">-</span><span class="n">width</span> <span class="n">N</span><span class="p">]</span>
                 <span class="p">[</span><span class="n">PATHS</span> <span class="o">...</span><span class="p">]</span>

<span class="n">Execute</span> <span class="n">fstringify</span> <span class="ow">or</span> <span class="n">beautify</span> <span class="n">commands</span> <span class="n">contained</span> <span class="ow">in</span> <span class="n">leoAst</span><span class="o">.</span><span class="n">py</span><span class="o">.</span>

<span class="n">positional</span> <span class="n">arguments</span><span class="p">:</span>
  <span class="n">PATHS</span>              <span class="n">directory</span> <span class="ow">or</span> <span class="nb">list</span> <span class="n">of</span> <span class="n">files</span>

<span class="n">options</span><span class="p">:</span>
  <span class="o">-</span><span class="n">h</span><span class="p">,</span> <span class="o">--</span><span class="n">help</span>         <span class="n">show</span> <span class="n">this</span> <span class="n">help</span> <span class="n">message</span> <span class="ow">and</span> <span class="n">exit</span>
  <span class="o">--</span><span class="n">fstringify</span>       <span class="n">fstringify</span> <span class="n">PATHS</span>
  <span class="o">--</span><span class="n">fstringify</span><span class="o">-</span><span class="n">diff</span>  <span class="n">fstringify</span> <span class="n">diff</span> <span class="n">PATHS</span>
  <span class="o">--</span><span class="n">orange</span>           <span class="n">beautify</span> <span class="n">PATHS</span>
  <span class="o">--</span><span class="n">orange</span><span class="o">-</span><span class="n">diff</span>      <span class="n">diff</span> <span class="n">beautify</span> <span class="n">PATHS</span>
  <span class="o">--</span><span class="n">allow</span><span class="o">-</span><span class="n">joined</span>     <span class="n">allow</span> <span class="n">joined</span> <span class="n">strings</span>
  <span class="o">--</span><span class="nb">max</span><span class="o">-</span><span class="n">join</span> <span class="n">N</span>       <span class="nb">max</span> <span class="n">unsplit</span> <span class="n">line</span> <span class="n">length</span> <span class="p">(</span><span class="n">default</span> <span class="mi">0</span><span class="p">)</span>
  <span class="o">--</span><span class="nb">max</span><span class="o">-</span><span class="n">split</span> <span class="n">N</span>      <span class="nb">max</span> <span class="n">unjoined</span> <span class="n">line</span> <span class="n">length</span> <span class="p">(</span><span class="n">default</span> <span class="mi">0</span><span class="p">)</span>
  <span class="o">--</span><span class="n">recursive</span>        <span class="n">include</span> <span class="n">directories</span> <span class="n">recursively</span>
  <span class="o">--</span><span class="n">tab</span><span class="o">-</span><span class="n">width</span> <span class="n">N</span>      <span class="n">tab</span><span class="o">-</span><span class="n">width</span> <span class="p">(</span><span class="n">default</span> <span class="o">-</span><span class="mi">4</span><span class="p">)</span>
</pre></div>
</div>
</section>
</section>
<section id="window-related-commands">
<h3><a class="toc-backref" href="#id98">Window-related commands</a><a class="headerlink" href="#window-related-commands" title="Permalink to this heading">¶</a></h3>
<dl>
<dt><code class="docutils literal notranslate"><span class="pre">cascade-windows</span></code></dt><dd><p>Cascades all Leo windows.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">equal-sized-panes</span></code></dt><dd><p>Adjusts the sizes of the outline and body panes so that they are the same height.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">minimize-all</span></code></dt><dd><p>Minimizes (hides) all Leo windows.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">show-colors</span></code></dt><dd><p>Opens a tab in the log pane showing various color pickers.
(Not implemented in Qt)</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">show-fonts</span></code></dt><dd><p>Open a tab in the log pane showing a font picker.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">suspend</span></code></dt><dd><p>Minimizes the present Leo window.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">toggle-split-direction</span></code></dt><dd><p>Switches between vertical and horizontal orientations of the Leo window.</p>
<p>In the vertical orientation, the body pane appears below the pane containing the outline and log panes. In the horizontal orientation, the body pane appears to the left the pane containing the outline and log panes. By default, the ratio of pane outline pane to the body pane is 0.5 in the vertical orientation and 0.3 in the horizontal orientation. These two ratios may be changed using settings.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">zoom-in</span></code></dt><dd><p>Increases text size by 1 pt.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">zoom-out</span></code>.</dt><dd><p>Decrease text size by 1 pt.</p>
</dd>
</dl>
</section>
<section id="vim-mode-commands">
<h3><a class="toc-backref" href="#id99">Vim mode commands</a><a class="headerlink" href="#vim-mode-commands" title="Permalink to this heading">¶</a></h3>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>:!
:%s
:e
:e!
:gT
:gt
:print-dot
:q
:q!
:qa
:r
:s
:tabnew
:toggle-vim-mode
:toggle-vim-trace
:toggle-vim-trainer-mode
:w
:wq
:xa
</pre></div>
</div>
</section>
</section>
<section id="key-reference">
<h2><a class="toc-backref" href="#id100">Key Reference</a><a class="headerlink" href="#key-reference" title="Permalink to this heading">¶</a></h2>
<p><code class="docutils literal notranslate"><span class="pre">print-bindings</span></code> prints a complete list of the bindings in effect.</p>
<div class="contents local topic" id="id13">
<p class="topic-title">Contents</p>
<ul class="simple">
<li><p><a class="reference internal" href="#id14" id="id150">Selecting outline nodes</a></p></li>
<li><p><a class="reference internal" href="#moving-outline-nodes" id="id151">Moving outline nodes</a></p></li>
<li><p><a class="reference internal" href="#id15" id="id152">Moving the cursor</a></p></li>
</ul>
</div>
<section id="id14">
<h3><a class="toc-backref" href="#id150">Selecting outline nodes</a><a class="headerlink" href="#id14" title="Permalink to this heading">¶</a></h3>
<p>When focus is in the outline pane:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Right</span><span class="o">-</span><span class="n">arrow</span> <span class="p">(</span><span class="n">expand</span><span class="o">-</span><span class="ow">and</span><span class="o">-</span><span class="n">go</span><span class="o">-</span><span class="n">right</span><span class="p">)</span>
<span class="n">Left</span><span class="o">-</span><span class="n">arrow</span> <span class="p">(</span><span class="n">contract</span><span class="o">-</span><span class="ow">or</span><span class="o">-</span><span class="n">go</span><span class="o">-</span><span class="n">left</span><span class="p">)</span>
<span class="n">Up</span><span class="o">-</span><span class="n">arrow</span> <span class="p">(</span><span class="n">goto</span><span class="o">-</span><span class="n">prev</span><span class="o">-</span><span class="n">visible</span><span class="p">)</span>
<span class="n">Down</span><span class="o">-</span><span class="n">arrow</span> <span class="p">(</span><span class="n">goto</span><span class="o">-</span><span class="nb">next</span><span class="o">-</span><span class="n">visible</span><span class="p">)</span>
</pre></div>
</div>
<p>Regardless of focus:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Alt</span><span class="o">-</span><span class="n">Home</span> <span class="p">(</span><span class="n">goto</span><span class="o">-</span><span class="n">first</span><span class="o">-</span><span class="n">visible</span><span class="o">-</span><span class="n">node</span><span class="p">)</span>
<span class="n">Alt</span><span class="o">-</span><span class="n">End</span> <span class="p">(</span><span class="n">goto</span><span class="o">-</span><span class="n">last</span><span class="o">-</span><span class="n">visible</span><span class="o">-</span><span class="n">node</span><span class="p">)</span>
<span class="n">Alt</span><span class="o">-</span><span class="n">Right</span><span class="o">-</span><span class="n">arrow</span> <span class="p">(</span><span class="n">expand</span><span class="o">-</span><span class="ow">and</span><span class="o">-</span><span class="n">go</span><span class="o">-</span><span class="n">right</span><span class="p">)</span>
<span class="n">Alt</span><span class="o">-</span><span class="n">Left</span><span class="o">-</span><span class="n">arrow</span> <span class="p">(</span><span class="n">contract</span><span class="o">-</span><span class="ow">or</span><span class="o">-</span><span class="n">go</span><span class="o">-</span><span class="n">left</span><span class="p">)</span>
<span class="n">Alt</span><span class="o">-</span><span class="n">Up</span><span class="o">-</span><span class="n">arrow</span> <span class="p">(</span><span class="n">goto</span><span class="o">-</span><span class="n">prev</span><span class="o">-</span><span class="n">visible</span><span class="p">)</span>
<span class="n">Alt</span><span class="o">-</span><span class="n">Down</span><span class="o">-</span><span class="n">arrow</span> <span class="p">(</span><span class="n">goto</span><span class="o">-</span><span class="nb">next</span><span class="o">-</span><span class="n">visible</span><span class="p">)</span>
</pre></div>
</div>
</section>
<section id="moving-outline-nodes">
<h3><a class="toc-backref" href="#id151">Moving outline nodes</a><a class="headerlink" href="#moving-outline-nodes" title="Permalink to this heading">¶</a></h3>
<p>When focus is in the outline:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Shift</span><span class="o">-</span><span class="n">Down</span><span class="o">-</span><span class="n">arrow</span> <span class="p">(</span><span class="n">move</span><span class="o">-</span><span class="n">outline</span><span class="o">-</span><span class="n">down</span><span class="p">)</span>
<span class="n">Shift</span><span class="o">-</span><span class="n">Left</span><span class="o">-</span><span class="n">arrow</span> <span class="p">(</span><span class="n">move</span><span class="o">-</span><span class="n">outline</span><span class="o">-</span><span class="n">left</span><span class="p">)</span>
<span class="n">Shift</span><span class="o">-</span><span class="n">Right</span><span class="o">-</span><span class="n">arrow</span> <span class="p">(</span><span class="n">move</span><span class="o">-</span><span class="n">outline</span><span class="o">-</span><span class="n">right</span><span class="p">)</span>
<span class="n">Shift</span><span class="o">-</span><span class="n">Up</span><span class="o">-</span><span class="n">arrow</span> <span class="p">(</span><span class="n">move</span><span class="o">-</span><span class="n">outline</span><span class="o">-</span><span class="n">up</span><span class="p">)</span>
</pre></div>
</div>
<p>Regardless of focus:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Alt</span><span class="o">-</span><span class="n">Shift</span><span class="o">-</span><span class="n">Down</span><span class="o">-</span><span class="n">arrow</span> <span class="p">(</span><span class="n">move</span><span class="o">-</span><span class="n">outline</span><span class="o">-</span><span class="n">down</span><span class="p">)</span>
<span class="n">Alt</span><span class="o">-</span><span class="n">Shift</span><span class="o">-</span><span class="n">Left</span><span class="o">-</span><span class="n">arrow</span> <span class="p">(</span><span class="n">move</span><span class="o">-</span><span class="n">outline</span><span class="o">-</span><span class="n">left</span><span class="p">)</span>
<span class="n">Alt</span><span class="o">-</span><span class="n">Shift</span><span class="o">-</span><span class="n">Right</span><span class="o">-</span><span class="n">arrow</span> <span class="p">(</span><span class="n">move</span><span class="o">-</span><span class="n">outline</span><span class="o">-</span><span class="n">right</span><span class="p">)</span>
<span class="n">Alt</span><span class="o">-</span><span class="n">Shift</span><span class="o">-</span><span class="n">Up</span><span class="o">-</span><span class="n">arrow</span> <span class="p">(</span><span class="n">move</span><span class="o">-</span><span class="n">outline</span><span class="o">-</span><span class="n">up</span><span class="p">)</span>
<span class="n">Ctrl</span><span class="o">-</span><span class="n">D</span> <span class="p">(</span><span class="n">move</span><span class="o">-</span><span class="n">outline</span><span class="o">-</span><span class="n">down</span><span class="p">)</span>
<span class="n">Ctrl</span><span class="o">-</span><span class="n">L</span> <span class="p">(</span><span class="n">move</span><span class="o">-</span><span class="n">outline</span><span class="o">-</span><span class="n">left</span><span class="p">)</span>
<span class="n">Ctrl</span><span class="o">-</span><span class="n">R</span> <span class="p">(</span><span class="n">move</span><span class="o">-</span><span class="n">outline</span><span class="o">-</span><span class="n">right</span><span class="p">)</span>
<span class="n">Ctrl</span><span class="o">-</span><span class="n">U</span> <span class="p">(</span><span class="n">move</span><span class="o">-</span><span class="n">outline</span><span class="o">-</span><span class="n">up</span><span class="p">)</span>
</pre></div>
</div>
</section>
<section id="id15">
<h3><a class="toc-backref" href="#id152">Moving the cursor</a><a class="headerlink" href="#id15" title="Permalink to this heading">¶</a></h3>
<p>When focus is in any of Leo’s text panes (body pane, log pane, headlines):</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Arrows</span>            <span class="n">move</span> <span class="n">one</span> <span class="n">character</span>
<span class="n">Ctrl</span><span class="o">-</span><span class="n">LeftArrow</span>    <span class="n">back</span> <span class="n">one</span> <span class="n">word</span>
<span class="n">Ctrl</span><span class="o">-</span><span class="n">RightArrow</span>   <span class="n">forward</span> <span class="n">one</span> <span class="n">word</span>
<span class="n">Home</span>              <span class="n">beginning</span> <span class="n">of</span> <span class="n">line</span>
<span class="n">End</span>               <span class="n">end</span> <span class="n">of</span> <span class="n">line</span>
<span class="n">Ctrl</span><span class="o">-</span><span class="n">Home</span>         <span class="n">beginning</span> <span class="n">of</span> <span class="n">the</span> <span class="n">body</span>
<span class="n">Ctrl</span><span class="o">-</span><span class="n">End</span>          <span class="n">end</span> <span class="n">of</span> <span class="n">body</span>
<span class="n">PageDown</span>          <span class="n">down</span> <span class="n">one</span> <span class="n">page</span>
<span class="n">PageUp</span>            <span class="n">up</span> <span class="n">one</span> <span class="n">page</span>
</pre></div>
</div>
<p><strong>Shift keys</strong>: Adding the Shift key modifier to any of the keys above moves the cursor and extends the selected text.</p>
</section>
</section>
</section>


            <div class="clearer"></div>
          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
            <p class="logo"><a href="leo_toc.html">
              <img class="logo" src="_static/LeoLogo.svg" alt="Logo"/>
            </a></p>
  <div>
    <h4>Previous topic</h4>
    <p class="topless"><a href="plugins.html"
                          title="previous chapter">Plugins</a></p>
  </div>
  <div>
    <h4>Next topic</h4>
    <p class="topless"><a href="directives.html"
                          title="next chapter">Directives Reference</a></p>
  </div>
<div id="searchbox" style="display: none" role="search">
  <h3 id="searchlabel">Quick search</h3>
    <div class="searchformwrapper">
    <form class="search" action="search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>
    </div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
        </div>
<div id="sidebarbutton" title="Collapse sidebar">
<span>«</span>
</div>

      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="directives.html" title="Directives Reference"
             >next</a> |</li>
        <li class="right" >
          <a href="plugins.html" title="Plugins"
             >previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="leo_toc.html">Leo 6.7.2 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="usersguide.html" >Leo’s Users Guide</a> &#187;</li>
        <li class="nav-item nav-item-this"><a href="">Leo’s Commands Reference</a></li> 
      </ul>
    </div>
    <div class="footer" role="contentinfo">
        &#169; Copyright 1997-2023, Edward K. Ream.
      Last updated on February 28, 2023.
      Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.3.0.
    </div>
  </body>
</html>